Closed pdpinch closed 9 years ago
Dave Ormsbee told us that edX would take care of this change.
After more discussion, Dave has asked us to take a first pass on this.
course_published (base_course_id) --> listener --> start celery task --> emit course_published event for all ccx_course_id derived from base_course_id.
for catching the publish signal:
https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/content/course_structures/si...
you'd add a listener for that signal. when it was triggered, your listener would check to see if the course_id it was triggered with is a CCX course. if it was, then the listener does nothing. if it wasn't, the listener would check in its models as to whether there are any CCX courses that are derived from the published course_id. if there are, we'd loop through all of those and emit the course_published signal with the CCX course_ids.
the only wrinkle is that to be scalable, we'd probably want to have the listener itself be a celery task. so ccx would need a tasks.py similar to what's in:
https://github.com/edx/edx-platform/blob/master/lms/djangoapps/lti_provider/tasks.py
The task looks to be pretty well defined, thanks. I will do this, most likely at the beginning of next week.
@pdpinch Made PR https://github.com/edx/edx-platform/pull/9109.
... just like regular courses. (edX is willing to help with this one as we didn't discuss this specifically. It is a low effort ask and has lots of downstream value)