Skip to main content

Module materialize

Module materialize 

Source
Expand description

Creating ledger rows for completions that are allowed to be registered. The same statement is the backfill: flipping a module on makes every pre-existing eligible completion match, and they stop at pending, because historical completions belong to students nobody ever asked.

Structs§

UnmaterialisedCompletion
A completion that should have a ledger row and has none.

Constants§

GRADE_IMPROVEMENT_LIMIT
How many re-attempts one iteration may start. Bounded apart from MATERIALIZE_LIMIT because each of these costs a round trip to the study registry for a credit the student already has.
MATERIALIZE_LIMIT
How many rows one iteration may create. Also the backfill’s rate limit.

Functions§

ensure_registration_rows_for_eligible_completions
Creates a pending row and its created event for every registrable completion that has none; returns the count.
get_unmaterialised_eligible_completions
Completions ensure_registration_rows_for_eligible_completions should have picked up at least min_age_secs ago and did not.
start_re_attempts_for_improved_grades
Supersedes accepted attempts whose completion has since been graded higher, and starts the next attempt at ready_to_submit; returns how many were started.