Skip to main content

Module course_module_suotar_configurations

Module course_module_suotar_configurations 

Source
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§

CourseModuleSuotarConfiguration
ModuleDiscoveryReport
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.
ModuleListingOutcome
Outcome counters for one enrolment-discovery run over one module. Written whole, so the dashboard never mixes two runs.
ModuleToList
An active module and the facts a list-by-course request for it needs.
SuotarConfigCheck
What one configuration check concluded. None means the check could not reach an answer, which the dashboard renders as “unknown” rather than as a failure.
SuotarModuleConfigFacts
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.
SuotarModuleOverview
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.
SuotarPause
Who paused a module’s credit registration, and why. One value rather than three arguments because course_module_suotar_configurations_pause_pair rejects 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_at and 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_at and the counters describing the last run that fed linking. Sibling of record_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. None resumes, and moves the rows’ enrolment check schedules on by as long as the pause lasted.