Skip to main content

Module resolve_enrolments

Module resolve_enrolments 

Source
Expand description

The resolve-enrolments phase: which enrolment the attainment belongs to, and what we will send.

Ends with the payload frozen and the row queued for import in checking_enrolment, never submitting: that state means a request may be in flight, and is the import phase’s to write.

The row spends the Suotar round trip itself in resolving_enrolment, not checking_enrolment: import’s claim query reads the latter, and the row’s own claim lock is gone as soon as the preflight transaction below commits. Landing in a state import does not claim keeps a second tick of import from sending a request before the enrolment this one resolves is known.

Structs§

ResolveEnrolments 🔒
ResolveRequest 🔒

Enums§

Preflight 🔒
A row that cannot even be asked about: each of these is the student’s or a teacher’s to fix, and none of them is worth a call.

Functions§

apply_answer 🔒
Applies the study registry’s answer for one row. Returns whether the row ended up in a failure state; errors with PreconditionFailed if the row left resolving_enrolment meanwhile.
choose 🔒
Applies the choice for one answered row. Returns whether the row ended up in a failure state.
improves_on 🔒
Whether the grade we would send beats the one the registry already holds for this course unit.
preflight 🔒
run