OL Open edX Course Sync
An Open edX plugin to sync course changes to its reruns.
Version Compatibility
It supports Open edX releases from Sumac and onwards.
Installing The Plugin
For detailed installation instructions, please refer to the plugin installation guide.
Installation required in:
CMS (for course sync functionality)
LMS (for problem attempts reset and rescore functionality)
Configuration
CMS Configuration
Add a setting OL_OPENEDX_COURSE_SYNC_SERVICE_WORKER_USERNAME for the service worker and all the sync operations will be done on behalf of this user.
For Tutor, you can run:
tutor config save --set OL_OPENEDX_COURSE_SYNC_SERVICE_WORKER_USERNAME={USERNAME}If you have a private.py for the CMS settings, you can add it to cms/envs/private.py.
Usage
Course Sync (CMS)
Install the plugin and run the migrations in the CMS.
- Add the parent/source organization in the CMS admin model CourseSyncOrganization.
Course sync will only work for this organization. It will treat all the courses under this organization as parent/source courses.
- The plugin will automatically add course re-runs created from the CMS as the child courses.
The organization can be different for the reruns.
Target/rerun courses can be managed in the CMS admin model CourseSyncMapping.
Now, any changes made in the source course will be synced to the target courses.
Legacy Library Migration (CMS)
The plugin provides a management command to migrate legacy (v1) library_content blocks in course(s) to reference v2 library item bank blocks.
Command: migrate_legacy_library_blocks_to_item_bank
Syntax:
python manage.py cms migrate_legacy_library_blocks_to_item_bank [OPTIONS]
Options:
--course-ids COURSE_KEYS: Migrate legacy library content blocks for the given comma-separated list of course keys.
--all-source-courses: Migrate legacy library content blocks for all source courses (i.e. all courses registered in the CourseSyncMapping admin model).
--persist-publish-state: Re-publish migrated blocks that were already published prior to the migration.
Exactly one of --course-ids or --all-source-courses must be provided.
Requires OL_OPENEDX_COURSE_SYNC_SERVICE_WORKER_USERNAME to be configured; the migration task runs on behalf of this user.
Examples:
Migrate legacy library content blocks for two courses:
python manage.py cms migrate_legacy_library_blocks_to_item_bank \
--course-ids "course-v1:edX+DemoX.1+2014,course-v1:edX+DemoX.2+2015"
Migrate legacy library content blocks for all source courses:
python manage.py cms migrate_legacy_library_blocks_to_item_bank --all-source-courses
Migrate and also re-publish blocks that were already published before the migration:
python manage.py cms migrate_legacy_library_blocks_to_item_bank --all-source-courses \
--persist-publish-state
Problem Actions (LMS)
The plugin provides a management command to reset learner attempts or rescore problems across the source course and all its synced target courses.
Command: sync_problem_actions
Syntax:
python manage.py lms sync_problem_actions <action> <source_course_key> <problem_id> [OPTIONS]
Actions:
reset_attempts: Resets learner attempts for a problem
rescore: Rescores learners for a problem
Options:
--username USERNAME: Username to run the task as (default: ‘courses_service_worker’)
--only-if-higher / --no-only-if-higher: Whether to rescore only if the new score is higher (default: True)
Examples:
Reset attempts for a problem across all synced courses:
python manage.py lms sync_problem_actions reset_attempts \
"course-v1:ORG+COURSE+RUN" \
"block-v1:ORG+COURSE+RUN+type@problem+block@abc123" \
--username courses_service_worker
Rescore a problem for all learners across all synced courses:
python manage.py lms sync_problem_actions rescore \
"course-v1:ORG+COURSE+RUN" \
"block-v1:ORG+COURSE+RUN+type@problem+block@abc123" \
--username courses_service_worker \
--only-if-higher
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 ol_openedx_course_sync-1.0.1.tar.gz.
File metadata
- Download URL: ol_openedx_course_sync-1.0.1.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a96e519b8be04b751114be716dda43a426ebcfb33358dca72cc0a923608a0b9b
|
|
| MD5 |
4dd46b3f7ed8dcb42c431b9cc89d1439
|
|
| BLAKE2b-256 |
e62b630a86cc32f848e3c8998556a2a2423144333c51bc82d35c1c476f2bbee1
|
File details
Details for the file ol_openedx_course_sync-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ol_openedx_course_sync-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3102dbdbfe48d1b2661acdbe630d8ba7fc5f560c4c8c7d3ac103d54033d6adcd
|
|
| MD5 |
e4fb2bbc4fa8f53574798fcfe697b2c3
|
|
| BLAKE2b-256 |
a4f851e9515694b655d7818eb6a5aa16aadef1c646a8c1deaa9bd7c9c7ab78df
|