Open edX plugin for automatically enrolling new users in admin-selected courses.
Project description
Open edX Auto Enroll
Open edX Auto Enroll is a Django plugin that enrolls newly registered users in courses selected from Django admin.
Features
Enable or disable automatic enrollment from Django admin.
Add one or more Open edX course keys from Django admin.
Choose the enrollment mode per course.
Automatically enroll users when the Open edX STUDENT_REGISTRATION_COMPLETED event is emitted.
Getting Started with Development
Please first see the Open edX documentation for guidance on Python development in Open edX plugin repositories.
Then follow the steps below to mount and install this plugin in a local Tutor-based Open edX instance:
# Clone the repository.
git clone git@github.com:Abstract-Tech/openedx-auto-enroll.git
# Mount the repository into Tutor.
tutor mounts add /path/to/openedx-plugins/openedx-auto-enroll
Tutor mounts the repository under /mnt/ in the Open edX containers. Install the plugin from inside the LMS container:
tutor dev exec lms bash
cd /mnt/openedx-auto-enroll
pip install -e .
Then run migrations from the Open edX platform directory:
cd ~/edx-platform/
./manage.py lms migrate
After installation, open Django admin and configure:
Auto enroll configuration: enable or disable automatic enrollment globally.
Auto enroll courses: add the course keys that new users should be enrolled in.
Useful development commands:
# Run tests locally inside this repository.
tox -e django42
# Build documentation.
make docs
# Re-run migrations after model changes.
tutor dev exec lms bash
cd ~/edx-platform/
./manage.py lms migrate
# Open an LMS shell when debugging enrollment behavior.
tutor dev exec lms bash
cd ~/edx-platform/
./manage.py lms shell
Installation
Install the package in the LMS environment and run migrations:
pip install openedx-auto-enroll
./manage.py lms migrate openedx_auto_enroll
Tutor Deployment
To install this plugin in a Tutor-managed Open edX instance, add it to Tutor’s OPENEDX_EXTRA_PIP_REQUIREMENTS configuration setting:
OPENEDX_EXTRA_PIP_REQUIREMENTS:
- git+https://github.com/Abstract-Tech/openedx-auto-enroll.git@X.Y.Z
Then rebuild/relaunch and run migrations:
tutor config save
tutor local launch
tutor local run lms ./manage.py lms migrate openedx_auto_enroll
For production environments, use the same extra pip requirement in your Tutor configuration, then rebuild the Open edX image and run migrations during deployment.
Configuration
In Django admin:
Open Auto enroll configuration and set enabled.
Open Auto enroll courses and add the course keys new users should be enrolled in.
Course keys should use the normal Open edX format, for example course-v1:edX+DemoX+Demo_Course.
How it Works
The plugin registers a handler for the Open edX STUDENT_REGISTRATION_COMPLETED event. When a new user completes registration, the handler checks the global admin switch, loads all enabled auto-enroll course rows, and enrolls the user in each selected course through Open edX’s CourseEnrollment.enroll API.
Change Log
0.1.0
Initial release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openedx_auto_enroll-0.1.0.tar.gz.
File metadata
- Download URL: openedx_auto_enroll-0.1.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
061448cd002194d06f9a1b3f935539f2897a67536916bc14ba6d30b9fa5a4961
|
|
| MD5 |
0d9cf05798a6e9430f42da887adb7d43
|
|
| BLAKE2b-256 |
0f52abbbb815d7feabd3d8988c29931538d3d5ada45974d0dd3131f25e6fdbc7
|
Provenance
The following attestation bundles were made for openedx_auto_enroll-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on Abstract-Tech/openedx-auto-enroll
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openedx_auto_enroll-0.1.0.tar.gz -
Subject digest:
061448cd002194d06f9a1b3f935539f2897a67536916bc14ba6d30b9fa5a4961 - Sigstore transparency entry: 2007014554
- Sigstore integration time:
-
Permalink:
Abstract-Tech/openedx-auto-enroll@f1d6822614958361f39b34a043bfd3108e02519c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Abstract-Tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f1d6822614958361f39b34a043bfd3108e02519c -
Trigger Event:
push
-
Statement type:
File details
Details for the file openedx_auto_enroll-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openedx_auto_enroll-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
968accf178abf2bbf6c99912ca67fa5d5acb29e18544a37aa1cfdc0e2fab1849
|
|
| MD5 |
fe0c49f843d41bbc48732c72752eeb97
|
|
| BLAKE2b-256 |
ff88df2e1d8100df133dc86b146de67eef1708cbf5cdd42e52c503ca842b0ba3
|
Provenance
The following attestation bundles were made for openedx_auto_enroll-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on Abstract-Tech/openedx-auto-enroll
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openedx_auto_enroll-0.1.0-py3-none-any.whl -
Subject digest:
968accf178abf2bbf6c99912ca67fa5d5acb29e18544a37aa1cfdc0e2fab1849 - Sigstore transparency entry: 2007014663
- Sigstore integration time:
-
Permalink:
Abstract-Tech/openedx-auto-enroll@f1d6822614958361f39b34a043bfd3108e02519c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Abstract-Tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f1d6822614958361f39b34a043bfd3108e02519c -
Trigger Event:
push
-
Statement type: