Skip to main content

Module logic

Module logic 

Source
Expand description

Per-item world-state resolution: pure functions over the working set, with now passed in.

The caller resolves faults ahead of this, so per item the order is first matching fault, then here.

Enumsยง

ImportResolution
What resolving one import item comes to before anything is written.
IncomingGrade ๐Ÿ”’
The Finnish grade string Suotar ranks by: 1โ€“5, โ€œHyv.โ€ or a fail.

Constantsยง

NO_ACCEPTORS_VIOLATION ๐Ÿ”’
Suotarโ€™s approver violation, as its translation table words it.
RECENTLY_ACCEPTED_HOURS ๐Ÿ”’
How far back Suotar checks its own accepted sends, which the importerโ€™s copy of Sisu may not show yet.

Functionsยง

acceptor_lookup_fails
Whether the batchโ€™s acceptor lookup would fail for any of these submissionsโ€™ course units.
attainment_summary ๐Ÿ”’
attainments_for ๐Ÿ”’
beats ๐Ÿ”’
Higher grade wins; with equal grades more credits win; with those equal too a later date wins, by more than a day on the 0โ€“5 scale. A fail never beats a pass.
clamp_into_study_right ๐Ÿ”’
A date on or before the start moves to the start, one on or after the end to the day before it, and nothing may precede a grant date that falls inside the validity.
course_not_allowed_reason ๐Ÿ”’
credits_of ๐Ÿ”’
enrolment_dto ๐Ÿ”’
enrolments_for ๐Ÿ”’
existing_attainment ๐Ÿ”’
import_outcome
Read back from the submission, the way Suotar answers after its send.
is_identical ๐Ÿ”’
is_passed ๐Ÿ”’
is_pending ๐Ÿ”’
An accepted send stays pending for good: Sisu took it, so notRegistered would invite a second.
list_by_course_item
Only realisations whose activity period ends after two months ago are listed; one with no end date never is.
numeric_grade ๐Ÿ”’
A pass/fail attainment has no numeric correspondence, which Suotar compares as zero.
recently_accepted ๐Ÿ”’
A send Sisu accepted within RECENTLY_ACCEPTED_HOURS of the same completion. Not matched on the date, which Suotarโ€™s cron runs vary for one completion.
record_submission
resolve_enrolments_item
resolve_import_item
Suotarโ€™s checks in its own order, first failure wins.
resolve_person_item
retry_after ๐Ÿ”’
validate_course_code_item
verify_item
write_and_send
Writes the submission and sends it: refused by Sisu when the world holds violations for it, accepted otherwise.