Skip to main content

Module reconcile

Expand description

What one code’s roster does to the modules on it: waking linked students’ registrations and claiming linking mails for everybody else.

Structs§

LinkedAccounts 🔒
The accounts linked to someone on one code’s roster, indexed once for every module on it.

Functions§

claim_linking_mails 🔒
Claims a linking mail for everyone in people we hold no link for, on each of course_ids or, for those in courses_of_late_completers, only on the courses their completion is on. Counts each person once by the strongest claim any course got for them.
distinct_people 🔒
A person enrolled on several realisations of the code is listed once per realisation; keeps the most recent enrolment of each, one with no enrolment time counting as the oldest.
enrolled_since 🔒
The people the linking mails consider by enrolment time: those enrolled at or after since. The rest are mailed only through late_completer_courses.
late_completer_courses 🔒
For each of early (unlinked, enrolled before since) whose Sisu primary or secondary address is the account email of someone with a registerable completion since since, keyed by Sisu person id, the courses that completion is on: their completion is why they are worth mailing now.
linking_candidates 🔒
The people on a roster a linking mail may go to, and the counters of those it may not: already linked, or with no address to mail.
list_unlinked 🔒
Everyone on a roster whom no account is linked to, whenever they enrolled, each once with their latest enrolment.
list_unlinked_enrolled_before 🔒
unlinked_enrolled_before over a whole roster, each person once with their latest enrolment.
load_linked_accounts 🔒
The accounts already linked to someone on the roster, by Sisu person id or student number.
reconcile_roster 🔒
Wakes the linked students’ registrations on every module of one code’s roster and claims a linking mail for everybody else, once per course on the code: mails and links are per course. Returns the linking mails claimed, for the caller’s roster-fetch summary.
roster_enrolees 🔒
The linked accounts on the roster, each with every enrolment id the registry lists them under.
unlinked_enrolled_before 🔒
The people enrolled_since leaves out, enrolled before since or at no known time, whom no account is linked to.