|
1 | | -⛔️ DEPRECATION WARNING |
2 | | -====================== |
3 | | -This repository is deprecated. Please see `open-edx-plugins <https://github.com/mitodl/open-edx-plugins>`__ for all the future updates and development. |
4 | | -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
5 | | - |
6 | | - |
7 | | -edx-sysadmin |
| 1 | +edX Sysadmin |
8 | 2 | ============================= |
9 | 3 |
|
10 | | -This is a django app plugin extracted from `edx-platform <https://github.com/edx/edx-platform>`_ which enables certain users to perform some specific operations in Open edX environment (which are described under ``Features`` section below). |
| 4 | +This is a django app plugin extracted from `edx-platform <https://github.com/edx/edx-platform>`_ which enables certian users to perform some specific operations in Open edX environment (which are described under ``Features`` section below). |
11 | 5 | Earlier, ``Sysadmin Dashboard`` was a part of ``edx-platform``, however starting from `lilac release <https://github.com/edx/edx-platform/tree/open-release/lilac.master>`_ of Open edX the sysadmin panel has been removed |
12 | 6 | and transitioned to as separate plugin. |
13 | 7 |
|
| 8 | +Note that the initial independent repository for this plugin was https://github.com/mitodl/edx-sysadmin. Now it has been migrated to open-edx-plugins. |
| 9 | + |
| 10 | + |
14 | 11 | NOTE: |
15 | 12 | It is recommended that you use edx-sysadmin plugin with Open edX's `lilac <https://github.com/edx/edx-platform/tree/open-release/lilac.master>`_ release and successors. |
16 | 13 | If you wish to use the ``Sysadmin Dashboard`` with Open edX releases before ``lilac`` you don't have to install this plugin and can simply enable ``ENABLE_SYSADMIN_DASHBOARD`` feature flag in environment files (e.g ``lms.yml`` or ``lms.env.json``) to access sysadmin dashboard features. |
17 | 14 |
|
18 | | -Features |
19 | | -~~~~~~~~ |
20 | | - |
21 | | -edx-sysadmin provides different features such as: |
| 15 | +Version Compatibility |
| 16 | +--------------------- |
| 17 | +**For "Lilac" or more recent release of edX platform** |
22 | 18 |
|
23 | | -* Register Users: |
24 | | - * You can ``register new user accounts`` with an easy to use form via ``Users`` tab. |
25 | | -* Delete Courses: |
26 | | - * You can ``delete any course by using a course ID or directory`` via ``Courses`` tab. |
27 | | -* Git Import: |
28 | | - * You can ``import any course maintained through a git repository`` via ``Git Import`` tab. |
29 | | -* Git Logs |
30 | | - * You can ``check the logs for all imported courses`` through git via ``Git Logs`` tab. |
31 | | -* Git Reload (Not directly visible) |
32 | | - * You can configure Github webhooks with this plugin to ensure reload/import of your courses on new commits |
| 19 | +Use any version of edx-sysadmin plugin. |
33 | 20 |
|
34 | 21 |
|
35 | | -Configurations |
36 | | --------------- |
37 | | -You have the following configuration properties to customize your plugin behavior: |
| 22 | +**For releases prior to "Lilac"** |
38 | 23 |
|
39 | | -* **GIT_REPO_DIR:** This path defines where the imported repositories will be places in storage. Default value is ``/edx/var/edxapp/course_repos``. |
40 | | -* **GIT_IMPORT_STATIC:** This is a boolean that tells the plugin to either load the static content from the course repo or not. Default value is ``True`` |
41 | | -* **SYSADMIN_GITHUB_WEBHOOK_KEY:** This value is used to save either of ``sha256 or sha1`` hashes. (This key is only used for Github Webhooks). Default value is ``None``. |
42 | | -* **SYSADMIN_DEFAULT_BRANCH:** This value is used to specify environment specific branch name to be used for course reload/import through Github Webhooks. (This key is only used for Github Webhooks). Default value is ``None`` |
| 24 | +You do not need edx-sysadmin plugin. Just enable ``ENABLE_SYSADMIN_DASHBOARD`` feature flag in environment files (e.g ``lms.yml`` or ``lms.env.json``) to access sysadmin dashboard features. |
43 | 25 |
|
44 | 26 |
|
45 | 27 | Installing The Plugin |
46 | | -~~~~~~~~~~~~~~~~~~~~~ |
47 | | - |
48 | | -* You can install the plugin into your Open edX environment using PyPI e.g. ``pip install edx-sysadmin`` or directly from github e.g. ``pip install https://github.com/mitodl/edx-sysadmin.git`` |
49 | | -* Once you have installed the plugin you can visit ``<EDX_BASE_URL>/sysadmin`` to access the plugin features. |
50 | | -* If you decide to make your own changes in the plugin you can go to ``Development Workflow`` section below. |
| 28 | +--------------------- |
51 | 29 |
|
52 | | -``Note``: In some cases you might need to restart edx-platform after installing the plugin to reflect the changes. |
| 30 | +For detailed installation instructions, please refer to the `plugin installation guide <../../docs#installation-guide>`_. |
53 | 31 |
|
| 32 | +Installation required in: |
54 | 33 |
|
55 | | -Development Workflow |
56 | | --------------------- |
| 34 | +* LMS |
| 35 | +* CMS |
57 | 36 |
|
58 | | -For development you need to install this plugin into your Open edX instance. |
| 37 | +Upon installation you need to create ``/openedx/course_repos`` directory within the LMS service: |
59 | 38 |
|
60 | 39 | .. code-block:: |
61 | 40 |
|
62 | | - # Clone edx-sysadmin to a directory which can be accessed from inside lms container i.e. ``src`` folder of |
63 | | - # Open edX devstack setup, which is present under root directory (sibling directory of edx-platform directory) |
64 | | - # and mapped at ``/edx/src`` inside edx-platform's lms container. |
65 | | - cd src |
66 | | - git clone git@github.com:mitodl/edx-sysadmin.git |
67 | | -
|
68 | | - # Open LMS shell |
69 | | - cd ../devstack |
70 | | - make lms-shell |
71 | | -
|
72 | | - # Remove edx-sysadmin plugin if already installed |
73 | | - pip uninstall edx-sysadmin |
74 | | -
|
75 | | - # Install plugin in editable mode |
76 | | - pip install -e /edx/src/edx-sysadmin |
77 | | -
|
78 | | - # If edx-sysadmin plugin doesn't reflect anything you can simply restart lms container (optional) |
79 | | - make lms-restart |
80 | | -
|
81 | | -After installation the plugin should be directly getting served through your edx-sysadmin cloned repo (present at src folder) and you can do live changes to the plugin and they will be reflected in your Open edX instance. |
| 41 | + tutor dev exec lms bash |
| 42 | + mkdir /openedx/course_repos |
82 | 43 |
|
83 | | -Testing |
84 | | -~~~~~~~ |
85 | | - |
86 | | -edx-sysadmin tests are dependent on edx-platform that's why they can only be run from inside of lms shell |
87 | | - |
88 | | -.. code-block:: |
89 | | -
|
90 | | - # Enter LMS shell |
91 | | - cd devstack |
92 | | - make lms-shell |
93 | | -
|
94 | | - # Go to the directory where edx-sysadmin is mapped inside container i.e. ``/edx/src/edx-sysadmin`` |
95 | | - cd /edx/src/edx-sysadmin |
96 | | -
|
97 | | - # Install requirements for running tests (you can also install requirements inside a virtual environment) |
98 | | - pip install -r ./requirements/quality.txt |
99 | | -
|
100 | | - # Run Pytest |
101 | | - pytest . |
102 | | -
|
103 | | - # Run black formatter |
104 | | - black --check . |
105 | | -
|
106 | | - # Run Pycodestyle |
107 | | - pycodestyle edx_sysadmin tests |
108 | | -
|
109 | | - # Run Pylint |
110 | | - pylint ./edx_sysadmin |
| 44 | +After this, you can visit ``<EDX_BASE_URL>/sysadmin`` to access the plugin features. |
111 | 45 |
|
| 46 | +Configurations |
| 47 | +-------------- |
| 48 | +The plugin offers multiple settings for customization that can be set using the config file in Open edX. For any release after Juniper, that config file is ``/edx/etc/lms.yml``. If you're using ``private.py``, add these values to ``lms/envs/private.py``. |
112 | 49 |
|
113 | | -License |
114 | | -------- |
| 50 | +* **GIT_REPO_DIR:** This path defines where the imported repositories will be placed in storage. Default value is ``/openedx/course_repos``. For Devstack, set this value to ``/edx/var/edxapp/course_repos``. |
| 51 | +* **GIT_IMPORT_STATIC:** This is a boolean that tells the plugin to either load the static content from the course repo or not. Default value is ``True`` |
| 52 | +* **SYSADMIN_GITHUB_WEBHOOK_KEY:** This value is used to save either of ``sha256 or sha1`` hashes. (This key is only used for Github Webhooks). Default value is ``None``. |
| 53 | +* **SYSADMIN_DEFAULT_BRANCH:** This value is used to specify environment specific branch name to be used for course reload/import through Github Webhooks. (This key is only used for Github Webhooks). Default value is ``None`` |
115 | 54 |
|
116 | | -The code in this repository is licensed under the AGPL 3.0 unless |
117 | | -otherwise noted. |
118 | | -Please see `LICENSE.txt <LICENSE.txt>`_ for details. |
| 55 | +Features |
| 56 | +-------- |
119 | 57 |
|
120 | | -How To Contribute |
121 | | ------------------ |
| 58 | +edx-sysadmin provides different features such as: |
122 | 59 |
|
123 | | -Contributions are very welcome. |
124 | | -Even though they were written with ``edx-platform`` in mind, the guidelines should be followed in all Open edX projects including this plugin. |
| 60 | +* Register Users: |
| 61 | + * You can ``register new user accounts`` with an easy to use form via ``Users`` tab. |
| 62 | +* Delete Courses: |
| 63 | + * You can ``delete any course by using a course ID or directory`` via ``Courses`` tab. |
| 64 | +* Git Import: |
| 65 | + * You can ``import any course maintained through a git repository`` via ``Git Import`` tab. |
| 66 | +* Git Logs |
| 67 | + * You can ``check the logs for all imported courses`` through git via ``Git Logs`` tab. |
| 68 | +* Git Reload (Not directly visible) |
| 69 | + * You can configure Github webhooks with this plugin to ensure reload/import of your courses on new commits |
0 commit comments