Expand description
The two terminal-state mails a student may get about a credit registration.
There are exactly two, and each is sent at most once per ledger row. Idempotency lives in the
credit_registrations.{action_needed,registered}_email_delivery_id columns rather than in the
phase, so a re-tick, a restart or a row re-entering the state cannot mail twice. A
grade-improvement attempt is a new row and does get its own mail.
Structs§
- Registration
Notification Email - One queued student mail and what we can honestly say about it.
- Student
Notification ToQueue - One row owed a mail, with everything the message renders.
open_university_product_idis the module’s configured product, from which the action-needed mail’s enrolment link is built.
Enums§
- Credit
Registration Notification Kind - Which of the two student mails a row is owed, or already holds.
Constants§
- STUDENT_
NOTIFICATION_ LIMIT - How many mails one iteration queues.
Functions§
- claim_
unnotified - Claims the rows owed a mail, locking them until the caller’s transaction ends, so callers must
pass a transaction. Never claims
cancelled,blockedor any failure state: those get nothing. - get_
for_ registrations - The mails queued for these rows, for the student, teacher and admin views that report on them. A row with neither mail queued yet contributes nothing.
- set_
email_ delivery_ id - Records which delivery carries the mail, which is also what takes the row out of the queue.