Skip to main content

Module attention

Module attention 

Source
Expand description

The Needs attention queue: which live rows want a person, why, and which of them a blocking problem, a dismissal or a timing threshold alone accounts for.

One query finds every row any detector picks; AttentionStanding then sorts each into exactly one section. Every count of “needs attention” (tab badge, overview, Courses column, Registrations filter, daily snapshot) is count_needing_attention or a grouping of the same rows, so none can disagree.

Structs§

AttentionDismissal
One dismissal still in force or recently made, for the “Dismissed recently” section.
AttentionRegistration
One live row at least one detector picked.
AttentionRules
Everything that decides which rows are picked and where each lands.
BlockingProblem
A problem that holds up many registrations at once.
BlockingProblems
The problems currently holding up many rows at once, as the alert rules see them.
StoppedPhase
A processing phase that is paused or late.

Enums§

AttentionReason
Why a row is picked. A row can carry several.
AttentionStanding
Which section of the Needs attention tab a picked row belongs to. Exactly one per row.
BlockingProblemKind
What kind of thing a BlockingProblem is, which decides what its subject names.

Constants§

STUDENT_NUMBER_STUCK_AFTER_PRESS
How long after an “I have enrolled” press a fetch of the code’s enrolment list must have started for a missing linking email to mean the student is stuck. Above the longest press-to-list delay seen in production (56 min).
TOO_MANY_SUBMIT_RETRIES
Resends after which retrying is not the answer. Verify polls do not count: confirming routinely takes many.

Functions§

count_needing_attention
The canonical Needs attention count: what the tab badge, the overview and the daily snapshot show.
dismiss_attention
Takes a row off the queue for as long as it carries only reasons, replacing any earlier dismissal of it. Call in the transaction that records the audit action.
get_attention_items
Every live row at least one detector picks, oldest phase start first, narrowed to only_ids when given. Superseded rows are outside every detector: acting on a replaced attempt is never right.
get_dismissals_since
Dismissals made since since, newest first.
needs_course_setup
Whether what stopped a row carrying error_code is the module’s configuration rather than anything support can fix.