openedx / openedx/openedx-platform
COURSE_ENROLLMENT_CREATED signal fired twice for a single enrollment
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
Description
On a local tutor setup, enrolling one user into one course results in COURSE_ENROLLMENT_CREATED being emitted twice, each with a distinct event_metadata.id. This was observed via a downstream receiver (webhook forwarder) that logged two separate deliveries for what should be a single enrollment action:
| event_type | event_id | timestamp |
|---|---|---|
| org.openedx.learning.course.enrollment.created.v1 | b9fed4e4-9bb3-11f1-b47b-8665a19c74ef | Aug. 19, 2026, 9:52 a.m. |
| org.openedx.learning.course.enrollment.created.v1 | b9de5ffc-9bb3-11f1-91fa-8665a19c74ef | Aug. 19, 2026, 9:52 a.m. |
Since the two events have different event_metadata.id values, this isn't a case of a receiver being connected twice (that would redeliver the same event id) — the event is being emitted twice by edx-platform itself for the same enrollment action.
Steps to reproduce
- On a dev setup, enroll a single user in a single course (via UI or enrollment API).
- Have a receiver connected to
COURSE_ENROLLMENT_CREATED(e.g. logging themetadata.idof each call). - Observe two invocations with different
event_metadata.idfor the same enrollment.
Expected behavior
One enrollment action should emit exactly one COURSE_ENROLLMENT_CREATED event.
Actual behavior
Two events are emitted with distinct ids, seconds apart, for the same user/course enrollment.
Environment
- tutor 22.0.0 openedx verawood.1
- Open edX Events:
openedx_events.learning.signals.COURSE_ENROLLMENT_CREATED
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
Reproduce the enrollment through the UI or enrollment API while logging event_metadata.id for COURSE_ENROLLMENT_CREATED. Trace the signal's emission paths in edx-platform and confirm completion when one enrollment action produces exactly one event with one distinct id.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100