openedx / openedx/openedx-platform
Emit COURSE_CREATED when a CCX (Custom Course for edX) is created
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
Summary
Creating a CCX via the coach dashboard does not emit the COURSE_CREATED Open edX event. We propose emitting org.openedx.content_authoring.course.created.v1 at CCX creation time using the new CCX’s course key. This makes CCX creation observable to event listeners and aligns it with other course lifecycle actions.
Why?
- Consistency with the platform’s definition of “course created.”
- Enables downstream automations (catalog sync, provisioning, notifications) that already listen for COURSE_CREATED.
- Parity with import/rerun flows that emit lifecycle events.
Proposed change
In lms/djangoapps/ccx/views.py::create_ccx, after the CCX is successfully persisted, send COURSE_CREATED with a CourseData payload whose course_key is the new CCX’s key. Prefer emitting inside transaction.on_commit to avoid races.
Impact
- Backward compatible (adds an event only).
- Negligible performance impact.
- No PII beyond the course identifier (per CourseData).
Acceptance criteria
- Creating a CCX emits exactly one COURSE_CREATED event.
- The event’s course.course_key equals the CCX’s key (not the parent course).
- Unit tests verify send_event is called with the expected CourseData.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lms/djangoapps/ccx/views.py at create_ccx and inspect how the new CCX is persisted and how existing lifecycle events are emitted. Verify the transaction behavior before adding the event path, then use the relevant CCX unit tests to confirm exactly one COURSE_CREATED event, the new CCX course key, and the expected CourseData payload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100