Skip to main content

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.

For this plugin’s compatibility with Open edX, see the Open edX Release Compatibility table.

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

Metadata

Release files for ol-openedx-course-sync 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ol-openedx-course-sync 1.1.0
File Size Uploaded Provenance Actions
ol_openedx_course_sync-1.1.0.tar.gz 13.4 kB Without provenance Details for ol_openedx_course_sync-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ol-openedx-course-sync 1.1.0
File Interpreter ABI Platform Actions
ol_openedx_course_sync-1.1.0-py3-none-any.whl Python 3 none any Details for ol_openedx_course_sync-1.1.0-py3-none-any.whl

Total release size: 33.9 kB

Release files / ol_openedx_course_sync-1.1.0.tar.gz

Download URL ol_openedx_course_sync-1.1.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
12b724761c8d08cd4cfd12fa7c4011875d38988167435ff501c39ad028121fbf
BLAKE2b-256 checksum
How to use checksums
f3d23f2e5f6154c37f97e3cb8d1cc76bf80a6a068e7077afbfab7f38b0687512
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / ol_openedx_course_sync-1.1.0-py3-none-any.whl

Download URL ol_openedx_course_sync-1.1.0-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08ff47ea32b16851c75109dcf96c4cc0097e55772eb3245789dff2b8a675c66c
BLAKE2b-256 checksum
How to use checksums
bdd32d19dd4d56075686bdbf9a69be7768e9f22fdd18653ed642534d43f8f4f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for ol-openedx-course-sync 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page