Skip to content

DEMO: add RegistrationDemographicsCaptured public signal#574

Draft
bmtcril wants to merge 2 commits into
mainfrom
bmtcril/oex26_conference_workshop
Draft

DEMO: add RegistrationDemographicsCaptured public signal#574
bmtcril wants to merge 2 commits into
mainfrom
bmtcril/oex26_conference_workshop

Conversation

@bmtcril
Copy link
Copy Markdown
Contributor

@bmtcril bmtcril commented May 17, 2026

For demonstration purposes only, do not merge.

Adds a new public signal, REGISTRATION_DEMOGRAPHICS_CAPTURED, fired by LMS once a learner has successfully registered and any optional demographic fields collected by an authn-form plugin have been validated.

Why a new event rather than extending STUDENT_REGISTRATION_COMPLETED?

  • STUDENT_REGISTRATION_COMPLETED carries only UserData today. Adding optional demographic fields to it would force every existing receiver to deal with the new attrs, and would couple a generic registration event to one specific use case (demographics collection).
  • A dedicated event lets deployments that don't collect demographics ignore it entirely, and lets deployments that do route it onto the event bus (Kafka/Redis) without touching the higher-volume registration-completed stream.
  • Versioning the signal independently (...captured.v1) means future changes to demographic field shape don't require bumping STUDENT_REGISTRATION_COMPLETED.

The payload is intentionally minimal: a UserData reference plus the two free-form string fields the plugin slot collects (pronouns, department). Fields default to empty strings so receivers don't have to special-case "demographics not collected on this deployment". This is a known flawed design (hard coding those fields is an anti-pattern, we cover this in the workshop).

Reference: see the OEX 2026 Conference workshop "Make It Extensible: Adding Extension Points Where You Need Them". This event is the one its registration demographics plugin subscribes to.

Adds a new public signal, ``REGISTRATION_DEMOGRAPHICS_CAPTURED``, fired
by LMS once a learner has successfully registered and any optional
demographic fields collected by an authn-form plugin have been
validated.

Why a new event rather than extending ``STUDENT_REGISTRATION_COMPLETED``?

* ``STUDENT_REGISTRATION_COMPLETED`` carries only ``UserData`` today.
  Adding optional demographic fields to it would force every existing
  receiver to deal with the new attrs, and would couple a generic
  registration event to one specific use case (demographics collection).
* A dedicated event lets deployments that don't collect demographics
  ignore it entirely, and lets deployments that do route it onto the
  event bus (Kafka/Redis) without touching the higher-volume
  registration-completed stream.
* Versioning the signal independently (``...captured.v1``) means future
  changes to demographic field shape don't require bumping
  ``STUDENT_REGISTRATION_COMPLETED``.

The payload is intentionally minimal: a ``UserData`` reference plus the
two free-form string fields the plugin slot collects (``pronouns``,
``department``). Fields default to empty strings so receivers don't have
to special-case "demographics not collected on this deployment".

Reference: see the OEX 2026 workshop "Leveraging Open edX Extension
Points" running example — this event is the one its registration
demographics plugin subscribes to.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant