Expand description
What the credit registration pipeline keeps per course module, one row each: whether the last
configuration check accepted the module, whether its registration is paused, and how its last
enrolment-discovery listing went. ensure_exists creates the row the writers update.
Modules§
- config_
check 🔒 - The configuration check: what it reads about each enabled module, and what it concluded.
- configuration 🔒
- The row itself, and the Courses tab’s overview of every enabled module.
- listing 🔒
- Enrolment discovery’s per-module listing: which modules a roster request covers, and what the last listing of each found.
- pause 🔒
- Pausing and resuming a module’s credit registration.
Structs§
- Course
Module Suotar Configuration - Module
Discovery Report - One active module’s counters from its last successful discovery run, and whether the attempts since then have been failing. Point-in-time, not a windowed sum: the phase overwrites the row whole, so every surface rendering them has to say so.
- Module
Listing Outcome - Outcome counters for one enrolment-discovery run over one module. Written whole, so the dashboard never mixes two runs.
- Module
ToList - An active module and the facts a
list-by-courserequest for it needs. - Suotar
Config Check - What one configuration check concluded.
Nonemeans the check could not reach an answer, which the dashboard renders as “unknown” rather than as a failure. - Suotar
Module Config Facts - Everything the per-module configuration check reads, gathered in one query so validating every enabled module costs one pass rather than a fan-out per module.
- Suotar
Module Overview - A Suotar-enabled module as the Courses tab lists it: what it is configured with, what the last check concluded, and how much work it has produced.
- Suotar
Pause - Who paused a module’s credit registration, and why. One value rather than three arguments
because
course_module_suotar_configurations_pause_pairrejects a timestamp without an actor.
Functions§
- count_
modules_ failing_ config_ check - Enabled modules the last check found broken. A module nothing has checked yet is not counted: unknown is not a failure.
- ensure_
exists - Gives the module a live configuration row, which the pause and config-check writers update.
- exists
- Whether the module already has a live configuration row. Lets a caller tell “nothing to store” apart from “the teacher cleared what was stored”, which look the same in an edit payload.
- get_
active_ discovery_ reports - Every active module’s last discovery counters, for the account-linking dashboard.
- get_
active_ modules_ for_ course - Every active, listable module of one course, unpaginated.
- get_
config_ facts_ for_ enabled_ modules - Every Suotar-enabled module’s configuration facts, optionally narrowed to one course. Paused modules are included: a paused module’s configuration is exactly what an operator is about to fix.
- get_
module_ overviews - Every Suotar-enabled module, one row each, ordered by course then module order.
- mark_
listing_ failed - Records a listing attempt whose roster never arrived.
last_listed_atand the counters keep describing the last roster that did, because zeroing them would make a failed listing read as an empty course. - mark_
listing_ succeeded_ without_ linking - Records a listing whose roster arrived while account linking is switched off: clears the failure
streak, but leaves
last_listed_atand the counters describing the last run that fed linking. Sibling ofrecord_listing_outcome. - record_
config_ check - Stamps the check result on the module, creating the configuration row for a module that has none: an enabled module with no configuration is itself one of the problems being reported.
- record_
listing_ outcome - Records a listing whose roster arrived: overwrites every counter and clears the failure streak.
Sibling of
mark_listing_failed. - set_
paused - Pauses or resumes the module. Every phase’s claim query skips a paused module, so pausing
freezes its ledger rows where they stand instead of cancelling them. Pausing a paused module
only updates who paused it and why.
Noneresumes, and moves the rows’ enrolment check schedules on by as long as the pause lasted.