Skip to content

Commit 507ad07

Browse files
committed
docs: some final updates to the ADR 003
1 parent 12fbd5c commit 507ad07

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

docs/decisions/0003-learning-path-enrollment-api.rst

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Model attributes
5656
* ``role`` - ``CharField`` to store the role of the user creating the enrollment.
5757
* ``enrolled_email`` - ``CharField`` to store the email of the learner.
5858
* ``state_transition`` - ``CharField`` to store the enrollment state transition.
59-
This field will use the existing `TRANSITION_STATES`_ from the LMS.
59+
This field will use the same values as `TRANSITION_STATES`_ from the LMS.
6060
* ``reason`` - ``TextField`` to store reason for manual enrollment.
6161
* ``history`` - `django-simple-history`_ ``HistoricalRecords`` field
6262

@@ -166,11 +166,8 @@ both self-unenrollment and staff-unenrollment.
166166
* Return a 404 when there are no active enrollments for the learner.
167167

168168
This method will be gated with a Django settings ``LEARNING_PATHS_ALLOW_SELF_UNENROLLMENT``
169-
and ``LEARNING_PATHS_ALLOW_STAFF_UNENROLLMENT`` that will default to ``False`` and
170-
will have to be explicitly enabled.
169+
and will default to ``False`` and will have to be explicitly enabled.
171170

172-
* When the ``LEARNING_PATHS_ALLOW_STAFF_UNENROLLMENT`` is ``False``, the ``is_active``
173-
field will be marked as **read-only**, preventing staff from unenrolling learners.
174171
* When the ``LEARNING_PATHS_ALLOW_SELF_UNENROLLMENT`` is ``False``, DELETE requests
175172
from non-staff members will be returned HTTP 403.
176173

@@ -211,15 +208,13 @@ The API will accept the following JSON data.
211208
212209
{
213210
"learning_paths": "path-v1:ABC+XYZ+2025_Term1,path-v1:CC+DDD+2025_Term1",
214-
"emails": "userA@example.com,new_user@example.com",
215-
"reason": "reason for bulk enrollment"
211+
"emails": "userA@example.com,new_user@example.com"
216212
}
217213
218214
219215
* `learning_paths` - a comma separated list of the Learning Path keys to enroll
220216
learner into
221217
* `emails` - a comma separated list of emails of the learners to enroll
222-
* `reason` - text explaining the reason for the bulk enrollment
223218

224219
The API view filter out the invalid emails and Learning Path IDs before
225220
processing the enrollments. For all combination of valid Learning Paths and the
@@ -228,9 +223,7 @@ user emails, the following will be created:
228223
#. A ``LearningPathEnrollmentAllowed`` object - with users linked for existing
229224
users, and just the emails for non-existing users.
230225
#. A ``LearningPathEnrollment`` object for existing users.
231-
#. A ``ManualEnrollmentAudit`` object which captures all the necessary metadata
232-
from the API call like ``enrolled_by`` user, ``reason`` and the relevant
233-
``state_transition``.
226+
234227

235228
7. User model post_save signal receiver for auto enrollment
236229
===========================================================

0 commit comments

Comments
 (0)