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 module with a course code, and what it concluded.
configuration 🔒
The row itself, and the Courses tab’s overview of every module with a course code.
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 last successful listing, and whether the attempts since then have been failing.
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 module costs one pass rather than a fan-out per module.
SuotarModuleOverview
A module with a course code 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
Modules with a course code 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 listing status, for the account-linking dashboard.
get_active_modules_for_course
Every active, listable module of one course, unpaginated.
get_config_facts_for_modules_with_course_code
The configuration facts of every module with a course code, 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_ids_failing_config_check
The modules count_modules_failing_config_check counts.
get_module_overviews
Every module with a course code, one row each, ordered by course then module order.
mark_listing_failed
Records a listing attempt whose roster never arrived. last_listed_at keeps describing the last roster that did, because a failed listing must not read as an empty course.
mark_listing_succeeded
Records a listing whose roster arrived and clears the failure streak. fed_linking is whether account linking was on for it; only then does it move last_listed_at. Sibling of mark_listing_failed.
record_config_check
Stamps the check result on the module, creating the configuration row for a module that has none: a module with a course code and no configuration is itself one of the problems being reported.
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.