Skip to content

Commit cf5f8de

Browse files
feat: add event_status to inline docs add ADR to support it
1 parent b085b04 commit cf5f8de

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

docs/decisions/0004-events-status.rst

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
1. Events status
2+
================
3+
4+
Status
5+
------
6+
7+
Draft
8+
9+
Context
10+
-------
11+
12+
Each Open edX Event will evolve according to the needs of the community.
13+
For that reason, with this ADR, we will define a lifecycle that each
14+
event will follow individually.
15+
16+
Decision
17+
--------
18+
19+
Each Open edX Event will follow the following lifecycle:
20+
21+
State 1. Provisional
22+
~~~~~~~~~~~~~~~~~~~~
23+
24+
Events just created and accepted in the repository `openedx-events`,
25+
these events haven't been accepted in Open edX platform or by the community.
26+
27+
State 2. Active
28+
~~~~~~~~~~~~~~~
29+
30+
Events being used by Open edX platform and by the community.
31+
32+
State 3. Deprecated
33+
~~~~~~~~~~~~~~~~~~~
34+
35+
Events that members of the community decide to deprecate in Open edX platform.
36+
37+
State 4. Removed
38+
~~~~~~~~~~~~~~~~~
39+
40+
Events that members of the community removed from Open edX platform after
41+
documentation and discussion of the removal.
42+
43+
State 5. Replaced
44+
~~~~~~~~~~~~~~~~~
45+
46+
Events that members of the community replaced for another event after
47+
documentation and discussion of the change.
48+
49+
50+
Consequences
51+
------------
52+
53+
1. Each event must carry its state in its code-annotation documentation.
54+
55+
2. Each event must go through each state in order. First, must be created
56+
in this repository with the state `provisional`, when Open edX accepts it
57+
must change to `active` and when the community decides to deprecate it, it
58+
must be updated to `deprecated`, then `removed`.
59+
60+
1. Each state must be up-to-date.

openedx_events/learning/signals.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# .. event_name: STUDENT_REGISTRATION_COMPLETED
1616
# .. event_description: emitted when the user registration process in the LMS is completed.
1717
# .. event_data: UserData
18+
# .. event_status: provisional
1819
STUDENT_REGISTRATION_COMPLETED = OpenEdxPublicSignal(
1920
event_type="org.openedx.learning.student.registration.completed.v1",
2021
data={
@@ -27,6 +28,7 @@
2728
# .. event_name: SESSION_LOGIN_COMPLETED
2829
# .. event_description: emitted when the user's login process in the LMS is completed.
2930
# .. event_data: UserData
31+
# .. event_status: provisional
3032
SESSION_LOGIN_COMPLETED = OpenEdxPublicSignal(
3133
event_type="org.openedx.learning.auth.session.login.completed.v1",
3234
data={
@@ -39,6 +41,7 @@
3941
# .. event_name: COURSE_ENROLLMENT_CREATED
4042
# .. event_description: emitted when the user's enrollment process is completed.
4143
# .. event_data: CourseEnrollmentData
44+
# .. event_status: provisional
4245
COURSE_ENROLLMENT_CREATED = OpenEdxPublicSignal(
4346
event_type="org.openedx.learning.course.enrollment.created.v1",
4447
data={
@@ -51,6 +54,7 @@
5154
# .. event_name: COURSE_ENROLLMENT_CHANGED
5255
# .. event_description: emitted when the user's enrollment update process is completed.
5356
# .. event_data: CourseEnrollmentData
57+
# .. event_status: provisional
5458
COURSE_ENROLLMENT_CHANGED = OpenEdxPublicSignal(
5559
event_type="org.openedx.learning.course.enrollment.changed.v1",
5660
data={
@@ -63,6 +67,7 @@
6367
# .. event_name: COURSE_ENROLLMENT_CHANGED
6468
# .. event_description: emitted when the user's unenrollment process is completed.
6569
# .. event_data: CourseEnrollmentData
70+
# .. event_status: provisional
6671
COURSE_UNENROLLMENT_COMPLETED = OpenEdxPublicSignal(
6772
event_type="org.openedx.learning.course.unenrollment.completed.v1",
6873
data={
@@ -75,6 +80,7 @@
7580
# .. event_name: CERTIFICATE_CREATED
7681
# .. event_description: emitted when the user's certificate creation process is completed.
7782
# .. event_data: CertificateData
83+
# .. event_status: provisional
7884
CERTIFICATE_CREATED = OpenEdxPublicSignal(
7985
event_type="org.openedx.learning.certificate.created.v1",
8086
data={
@@ -87,6 +93,7 @@
8793
# .. event_name: CERTIFICATE_CHANGED
8894
# .. event_description: emitted when the user's certificate update process is completed.
8995
# .. event_data: CertificateData
96+
# .. event_status: provisional
9097
CERTIFICATE_CHANGED = OpenEdxPublicSignal(
9198
event_type="org.openedx.learning.certificate.changed.v1",
9299
data={
@@ -99,6 +106,7 @@
99106
# .. event_name: CERTIFICATE_REVOKED
100107
# .. event_description: emitted when the user's certificate annulation process is completed.
101108
# .. event_data: CertificateData
109+
# .. event_status: provisional
102110
CERTIFICATE_REVOKED = OpenEdxPublicSignal(
103111
event_type="org.openedx.learning.certificate.revoked.v1",
104112
data={
@@ -111,6 +119,7 @@
111119
# .. event_name: COHORT_MEMBERSHIP_CHANGED
112120
# .. event_description: emitted when the user's cohort update is completed.
113121
# .. event_data: CohortData
122+
# .. event_status: provisional
114123
COHORT_MEMBERSHIP_CHANGED = OpenEdxPublicSignal(
115124
event_type="org.openedx.learning.cohort_membership.changed.v1",
116125
data={

0 commit comments

Comments
 (0)