openedx / openedx/openedx-platform

COURSE_ENROLLMENT_CREATED signal fired twice for a single enrollment

Open
#39,002 0 comments 0 reactions 0 assignees View on GitHub

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

  1. On a dev setup, enroll a single user in a single course (via UI or enrollment API).
  2. Have a receiver connected to COURSE_ENROLLMENT_CREATED (e.g. logging the metadata.id of each call).
  3. Observe two invocations with different event_metadata.id for 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.