Skip to content

Where all the extensions & tools for the Open edX Demo Site installation live!

License

Notifications You must be signed in to change notification settings

eduNEXT/openedx-demo-plugin

Repository files navigation

Open edX Demo plugin

CI License

Overview

Where all the extensions & tools for the Open edX Demo Site installation live!

Here's the list of solutions implemented in this repository:

  • Assign course access roles to users after their registration process
  • Common configurations
  • Commands for resetting databases to initial state [WIP]

Usage

First, install the plugin:

git clone https://github.com/eduNEXT/openedx-demo-plugin/
pip install ./openedx-demo-plugin

Then, these configurations will be added by the plugin:

OPEN_EDX_FILTERS_CONFIG = {
    "org.openedx.learning.homepage.render.started.v1": {
        "fail_silently": False,
        "pipeline": [
            "openedx_demo_plugin.pipeline.FilterCoursesByOrganization"
        ]
    },
    "org.openedx.learning.catalog.render.started.v1": {
        "fail_silently": False,
        "pipeline": [
            "openedx_demo_plugin.pipeline.FilterCoursesByOrganization"
        ]
    }
},
OPEN_EDX_VISITOR_ORG = "Public"
FEATURES["ENABLE_CREATOR_GROUP"] = True
COURSE_CREATOR_ADMIN_ID = "random-user-with-staff-permissions"

With this, you'll be able to:

  • After the registration your user will have course creator permissions
  • Courses with Public organization won't be shown in the catalog/homepage

Development Workflow

One Time Setup

# Clone the repository
git clone git@github.com:edx/openedx-demo-plugin.git
cd openedx-demo-plugin

# Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
mkvirtualenv -p python3.8 openedx-demo-plugin

Every time you develop something in this repo

# Activate the virtualenv
workon openedx-demo-plugin

# Grab the latest code
git checkout main
git pull

# Install/update the dev requirements
make requirements

# Run the tests and quality checks (to verify the status before you make any changes)
make validate

# Make a new branch for your changes
git checkout -b <your_github_username>/<short_description>

# Using your favorite editor, edit the code to make your change.
vim …

# Run your new tests
pytest ./path/to/new/tests

# Run all the tests and quality checks
make validate

# Commit all your changes
git commit …
git push

# Open a PR and ask for review.

License

The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.

Please see LICENSE.txt for details.

About

Where all the extensions & tools for the Open edX Demo Site installation live!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •