Skip to main content

Module import

Expand description

The import phase: the one call that creates something in the study registry.

A row is committed as submitting before the request leaves, and no path leads from that state or submission_uncertain back into a batch: a second import for one row would put a second attainment on a real transcript, and we could neither see it nor undo it.

Structs§

Import 🔒

Enums§

Unsendable 🔒
A frozen snapshot that cannot be sent; either would come back as a request-level rejection that takes the rest of the batch with it.

Constants§

CLAIMED_STATES 🔒
The only state this phase claims; the absence of submitting, submission_uncertain and resolving_enrolment is what makes a second import for one row, or an import before its enrolment is resolved, unreachable.

Functions§

apply_answer 🔒
Applies the study registry’s answer for one submitted row. Returns whether the row ended up in a failure state; errors with PreconditionFailed if the row left submitting meanwhile.
held_grade 🔒
The registry’s own grade for an attainment, with its scale named: “1” is a pass on one scale and a one out of five on the other.
record_attainment 🔒
request_item 🔒
Builds the request item from the frozen snapshot, or says why the row cannot go into a batch.
round_credits 🔒
Rounds away the f32-to-f64 widening error before the value goes on the wire: ECTS credits are never finer than a hundredth, and 2.7f32 would otherwise be sent as 2.700000047683716.
run
settled_message 🔒
The timeline line for an answer that settled the row. not_improved names the grade the registry held, because “already equal or better” without it reads as a bug to whoever raised the grade.