-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from open-craft/fox/BB-7351-admin-views
[BB-7351] feat: admin views.
- Loading branch information
Showing
37 changed files
with
1,815 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ pip-log.txt | |
.tox | ||
coverage.xml | ||
htmlcov/ | ||
|
||
pii_report/ | ||
|
||
|
||
# The Silver Searcher | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,32 @@ | ||
section-to-course | ||
############################# | ||
################# | ||
|
||
|pypi-badge| |ci-badge| |codecov-badge| |pyversions-badge| | ||
|license-badge| |status-badge| | ||
|
||
Purpose | ||
******* | ||
|
||
Allows course authors to factor sections from Open edX courses into their own new course. | ||
|
||
|
||
License | ||
******* | ||
|
||
The code in this repository is licensed under the AGPL 3.0. | ||
|
||
Please see `LICENSE.txt <LICENSE.txt>`_ for details. | ||
|
||
Contributing | ||
************ | ||
|
||
Contributions are very welcome. | ||
|
||
This project is currently accepting all types of contributions, bug fixes, | ||
security fixes, maintenance work, or new features. However, please make sure | ||
to have a discussion about your new feature idea with the maintainers prior to | ||
beginning development to maximize the chances of your change being accepted. | ||
You can start a conversation by creating a new issue on this repo summarizing | ||
your idea. | ||
|
||
Reporting Security Issues | ||
************************* | ||
|
||
Please do not report security issues in public. Please email [email protected]. | ||
|
||
.. |license-badge| image:: https://img.shields.io/github/license/open-craft/section-to-course.svg | ||
:target: https://github.com/open-craft/section-to-course/blob/main/LICENSE.txt | ||
:alt: License | ||
|
||
.. |status-badge| image:: https://img.shields.io/badge/Status-Experimental-yellow | ||
|
||
|
||
Installation | ||
************ | ||
|
||
This application is not yet available on PyPI, so you will need to install it from source. You can install it from source on the current master branch by adding: | ||
This application is not yet available on PyPI, so you will need to install it from source. You can install it from source on the current ``main`` branch by adding: | ||
|
||
.. code-block:: bash | ||
git+https://github.com/open-craft/section-to-course.git | ||
...to the ``requirements/private.txt`` file of your Open edX installation, and then run ``pip install -r requirements/private.txt``. ``section_to_course`` is currently only known to work with OpenCraft's Nutmeg fork of Open edX, so you will need to use that fork. We expect it will work with newer upstream versions within a few weeks. | ||
...to the ``requirements/private.txt`` file of your Open edX installation, and then run ``pip install -r requirements/private.txt``. If you're developing locally without the platform, create a virtualenv using the latest Python 3.8 release, and then run ``pip install -e .`` from the root of this repository. | ||
|
||
Development | ||
----------- | ||
=========== | ||
|
||
If developing on this application, you will need to install it as an editable package. To do so, follow these steps: | ||
|
||
1. Set up the Open edX `devstack <https://github.com/openedx/devstack>`_ using the `nutmeg.master` version as explained in `this guide <https://edx.readthedocs.io/projects/open-edx-devstack/en/latest/developing_on_named_release_branches.html>`_. | ||
1. Set up the Open edX `devstack <https://github.com/openedx/devstack>`_ using the ``nutmeg.master`` version as explained in `this guide <https://edx.readthedocs.io/projects/open-edx-devstack/en/latest/developing_on_named_release_branches.html>`_. | ||
|
||
Then, in the ``edx-platform`` repository root, run: | ||
|
||
|
@@ -73,10 +42,76 @@ Then, in the ``edx-platform`` repository root, run: | |
git clone [email protected]:open-craft/section-to-course.git | ||
Then, in your `devstack` directory, run: | ||
Then, in your ``devstack`` directory, run: | ||
|
||
.. code-block:: bash | ||
make dev.shell.studio | ||
cd /edx/src/section-to-course | ||
pip install -e . | ||
Usage | ||
***** | ||
|
||
Once installed, the plugin should automatically register itself within Django. Be sure to run database migrations. | ||
|
||
The admin views are in the Django admin, under the "Section to Course" section. From there, you can create a new section to course link, which will create a new course with the same content as the section you selected. You can also view the list of existing section to course links, refresh them, and delete them. | ||
|
||
Refreshing a Course | ||
=================== | ||
|
||
There are two ways to refresh a course: | ||
|
||
1. Use the admin action from the changelist view. This will allow you to refresh several courses at once. | ||
2. Use the refresh button on the detail view for a single course, shown here: | ||
|
||
.. image:: assets/admin_screenshot.png | ||
:alt: A screenshot of the admin page showing the refresh button in the upper left | ||
|
||
License | ||
******* | ||
|
||
The code in this repository is licensed under the AGPL 3.0. | ||
|
||
Please see `LICENSE.txt <LICENSE.txt>`_ for details. | ||
|
||
Contributing | ||
************ | ||
|
||
Contributions are very welcome. | ||
|
||
This project is currently accepting all types of contributions, bug fixes, | ||
security fixes, maintenance work, or new features. However, please make sure | ||
to have a discussion about your new feature idea with the maintainers prior to | ||
beginning development to maximize the chances of your change being accepted. | ||
You can start a conversation by creating a new issue on this repo summarizing | ||
your idea. | ||
|
||
Reporting Security Issues | ||
************************* | ||
|
||
Please do not report security issues in public. Please email [email protected]. | ||
|
||
.. |pypi-badge| image:: https://img.shields.io/pypi/v/section-to-course.svg | ||
:target: https://pypi.python.org/pypi/section-to-course/ | ||
:alt: PyPI | ||
|
||
.. |ci-badge| image:: https://github.com/open-craft/section-to-course/workflows/Python%20CI/badge.svg?branch=main | ||
:target: https://github.com/open-craft/section-to-course/actions | ||
:alt: CI | ||
|
||
.. |codecov-badge| image:: https://codecov.io/github/open-craft/section-to-course/coverage.svg?branch=main | ||
:target: https://codecov.io/github/open-craft/section-to-course?branch=main | ||
:alt: Codecov | ||
|
||
.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/section-to-course.svg | ||
:target: https://pypi.python.org/pypi/section-to-course/ | ||
:alt: Supported Python versions | ||
|
||
.. |license-badge| image:: https://img.shields.io/github/license/open-craft/section-to-course.svg | ||
:target: https://github.com/open-craft/section-to-course/blob/main/LICENSE.txt | ||
:alt: License | ||
|
||
.. |status-badge| image:: https://img.shields.io/badge/Status-Experimental-yellow | ||
:alt: Project status |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Core requirements for using this application | ||
-c constraints.txt | ||
edx-opaque-keys>=2.3.0 | ||
django>=3.2.15 | ||
django-model-utils>=4.2.0 | ||
djangorestframework | ||
django | ||
django-model-utils | ||
django-object-actions | ||
edx-django-utils | ||
edx-opaque-keys | ||
edx-organizations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.