Skip to main content

Module risk

Module risk 

Source
Expand description

Risk rules: which staged changes only the user may publish, on the review page.

Only live content is risky. Draft and test-mode courses, hidden pages and chapters that haven’t opened yet are free. Size alone never makes a change risky, and moving exercises never does: an exercise’s deadline counts only when its own deadline field changes.

Risk belongs to the whole changeset against the live course, so it is judged on every staged entity at once: an exercise moved off its page by one call and removed by another is still a removal.

Structs§

ChangesetState 🔒
A changeset as its risk and publish blockers are judged: the live course, the course with the changeset laid over it, and the risk reasons stored with each staged entity.
Classifier 🔒
The state of one classify call. The rule families run in a fixed order, since an entity’s reasons are compared with the stored ones as a list.
Reclassified 🔒
A changeset’s risk reasons classified again.
StudentActivity
Published facts about student activity that make a change risky.

Enums§

RiskBaseline
What the caller has already loaded of the course a changeset’s risk and publish blockers are judged on.

Functions§

classify
The risk reasons of each entity staged changes from live, at now.
load_student_activity
Which exercises have submissions and which modules have completions.
reclassify 🔒
Classifies the changeset’s staged state again, against its live course and student activity now, and stores the reasons that changed.