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§
- Changeset
State 🔒 - 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
classifycall. 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.
- Student
Activity - Published facts about student activity that make a change risky.
Enums§
- Risk
Baseline - 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
stagedchanges fromlive, atnow. - 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.