Skip to content

Commit 89cc190

Browse files
committed
docs
1 parent 1c1da69 commit 89cc190

File tree

7 files changed

+32
-9
lines changed

7 files changed

+32
-9
lines changed

src/ol_openedx_course_sync/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ python_distribution(
1313
provides=setup_py(
1414
name="ol-openedx-course-sync",
1515
version="0.1.0",
16-
description="An edX plugin to sync changes in a course to its child courses",
16+
description="An edX plugin to sync changes in a course to its target/child/rerun courses",
1717
license="BSD-3-Clause",
1818
author="MIT Office of Digital Learning",
1919
entry_points={

src/ol_openedx_course_sync/README.rst

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
edX Username Changer
1+
OL Open edX Course Sync
22
=======================
33

4-
A plugin to enable course updates sync to the target/rerun courses.
4+
A plugin to enable course updates to sync with the target/child/rerun courses.
55

66
Version Compatibility
77
---------------------
@@ -16,3 +16,15 @@ For detailed installation instructions, please refer to the `plugin installation
1616
Installation required in:
1717

1818
* CMS
19+
20+
Usage
21+
-----
22+
23+
- Install the plugin and Run the migrations in the CMS.
24+
- Add the parent/source organization in the CMS admin model `CourseSyncParentOrg`.
25+
- Course sync will only work for this organization. It will treat all the courses under this organization as parent/source courses.
26+
- Plugin will automatically add course reruns created from the CMS as the target/child courses for any of the parent course from the organization added above.
27+
- Organization can be different for the reruns.
28+
- Target/child/rerun courses can be managed in the CMS admin model `CourseSyncMap`.
29+
- You can update the comma separated target course list.
30+
- Now any changes made in the parent/source course will be synced to the target/child/rerun courses.
+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
# pylint: disable=missing-module-docstring
1+
"""
2+
ol-openedx-course-sync plugin
3+
"""
4+
25
__version__ = 0.1
36
default_app_config = "ol_openedx_course_sync.apps.OLOpenEdxCourseSyncConfig"

src/ol_openedx_course_sync/admin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Django admin pages for ol-openedx-course-sync plugin
2+
Django admin for ol-openedx-course-sync plugin
33
"""
44

55
from django.contrib import admin

src/ol_openedx_course_sync/models.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Models for ol-openedx-course-sync plugin
3+
"""
4+
15
from django.db import models
26
from opaque_keys.edx.django.models import (
37
CourseKeyField,

src/ol_openedx_course_sync/signals.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Signal handlers ol-openedx-course-sync plugin
2+
Signal handlers for ol-openedx-course-sync plugin
33
"""
44

55
import logging
@@ -21,7 +21,7 @@ def listen_for_course_publish(
2121
**kwargs, # noqa: ARG001
2222
):
2323
"""
24-
Copy course content from source course to destination course.
24+
Listen for course publish signal and trigger course sync task
2525
"""
2626
if not CourseSyncParentOrg.objects.filter(organization=course_key.org).exists():
2727
return
@@ -41,7 +41,7 @@ def listen_for_course_publish(
4141
@receiver(post_save, sender=CourseRerunState)
4242
def listen_for_course_rerun_state_post_save(sender, instance, **kwargs): # noqa: ARG001
4343
"""
44-
Update target courses in `CourseSyncMap`
44+
Listen for `CourseRerunState` post_save and update target courses in `CourseSyncMap`
4545
"""
4646
if instance.state != "succeeded":
4747
return

src/ol_openedx_course_sync/utils.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
"""
2+
Utility methods for the ol-openedx-course-sync plugin
3+
"""
4+
15
from xmodule.modulestore.django import modulestore
26

37

48
def copy_course_content(user_id, source_course_key, dest_course_key, branch):
59
"""
610
Copy course content from source course to destination
7-
course on the specified modulestore branch.
11+
course on the specified branch.
812
"""
913
module_store = modulestore()
1014
subtree_list = [module_store.make_course_usage_key(source_course_key)]

0 commit comments

Comments
 (0)