Skip to content

feat: add ol-openedx-course-sync plugin #492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

asadali145
Copy link
Contributor

@asadali145 asadali145 commented Apr 30, 2025

What are the relevant tickets?

https://github.com/mitodl/hq/issues/7197

Description (What does it do?)

Adds a new plugin to sync changes from one course to other courses named ol-openedx-course-sync.

How can this be tested?

  • Build the package using pants
  • Install in the cms and restart the cms
  • go to the CMS shell and run the CMS migrations
  • Now to the CMS admin, you will see 2 models Course Sync Parent Orgs and Course Sync Maps
  • Add the source Org in the Course Sync Parent Orgs.
    • This organization will act as the source organization and will be used to sync changes to rerun/target courses.
  • Now create a new course for this organization in the CMS.
  • Add some content in the course.
  • Now create a rerun for this course in the CMS. Rerun can be in the same or different organization.
  • Go to the CMS admin model Course Sync Maps and verify the newly added entry. Verify the source course and target course values.
    • Create different runs/courses with same/different orgs and verify the model data.
    • Model will not add a source to any other source or target courses to avoid sync loops.
  • You can change/update source and target courses manually.
  • Now make changes in the source course, changes should propagate to the target courses.
  • Unpublished and published changes should remain in the same state
  • Learner progress should be retained
  • Test different types of problems.
  • Test any other cases as needed.

Copy link
Contributor

@arslanashraf7 arslanashraf7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not a full code review, but I skimmed through the code and it looks fine to me.

I tested this on multiple scenarios and it works fine as per my testing.

  1. Tested it with different course outline units
  2. Tested it with a mix of published and draft outlines
  3. Tested it with the grading policy, and that also gets copied into re-runs
  4. Tested the progress as a student in a re-run, and that worked fine too
  5. Tested with large courses, it does take some time, but it works for them too
  6. Tested it with course re-runs for different organizations, and it worked, Although it takes some time.

We will have to make some optimizations here. Ideally, run the copy operation in celery tasks. It would be great if we could use the same mechanism as edX's Insturctor Tasks/Model to be able to trace errors and progress via the instructor tasks API if needed.

@asadali145
Copy link
Contributor Author

We will have to make some optimizations here. Ideally, run the copy operation in celery tasks. It would be great if we could use the same mechanism as edX's Insturctor Tasks/Model to be able to trace errors and progress via the instructor tasks API if needed.

Sure, I will refine code + do this once I get a go ahead.

@asadali145 asadali145 force-pushed the asad/ol-openedx-course-propagator branch from 15dead2 to ba29b9d Compare May 8, 2025 09:17
@asadali145 asadali145 force-pushed the asad/ol-openedx-course-propagator branch from 490f95f to 4872c3a Compare May 12, 2025 15:36
@asadali145 asadali145 changed the title POC: add ol-openedx-course-propagator feat: add ol-openedx-course-sync plugin May 13, 2025
@asadali145 asadali145 force-pushed the asad/ol-openedx-course-propagator branch 2 times, most recently from 428f22a to 07b29ca Compare May 14, 2025 11:19
@asadali145 asadali145 force-pushed the asad/ol-openedx-course-propagator branch 2 times, most recently from e82072e to 0f314a1 Compare May 15, 2025 14:19
@asadali145 asadali145 force-pushed the asad/ol-openedx-course-propagator branch from 0f314a1 to 591ae38 Compare May 15, 2025 14:22
@asadali145 asadali145 marked this pull request as ready for review May 19, 2025 10:29
@asadali145 asadali145 requested a review from arslanashraf7 May 19, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants