Skip to main content

Module enrolment_selection

Module enrolment_selection 

Source
Expand description

Which of a student’s enrolments the attainment is registered against. A study right that covers the attainment date first, since Sisu refuses one that does not; then degree before open university: a degree student who also holds an open-university study right wants the credit inside their degree.

Structs§

EnrolmentCriteria

Enums§

NoUsableEnrolment
Why no enrolment could carry the attainment; each variant reads differently to the student.

Constants§

CREDITS_TOLERANCE 🔒
Slack for the f32-to-f64 widening. Real credit amounts are never finer than 0.1.
DEGREE_KIND
ENROLLED_STATE
FAILED_STATE
RECOVERY_REGISTRATION_WINDOW_DAYS 🔒
How long after the submission its attainment may be registered and still count as its own.

Functions§

attained_candidates
The attainments a new one must improve on: every entry on the student and course code that is not failed, matching the scope Suotar’s own import checks against.
attainment_matching_submission
The attainment a submission we lost track of would have produced, matched on what we sent.
credits_fit 🔒
Whether an enrolment’s registry-declared credit range can carry the module’s credits.
is_valid_attainment 🔒
preferred_attainment
The attainment sisu_attainment_id records: the course unit one when there is one, else the latest.
select_enrolment
The enrolment to register an attainment against, or why none will do: an accepted one whose credit range carries criteria.credits, preferring one whose study right covers the attainment date, then a degree study right, then one whose activity period covers it, then the latest enrolment.
valid_range 🔒
(min, max). A missing bound or min > max is the registry’s own data at fault, and as unusable as no range.