Expand description
Publishing a changeset to the live course.
Structs§
- Authors 🔒
- Who the history of each published entity is attributed to: the changeset’s owner, through the latest call that staged the entity.
- Publish
Context 🔒 - What writing a changeset’s staged entities uses besides the entities.
- Publish
Options - How a publish may proceed. The publisher is always the changeset’s owner, which the caller checks.
- Publishable 🔒
- A changeset that may be published: its staged rows and the bases they were staged on.
- Refusal 🔒
- Why publishing stops before writing anything.
- Staged
Writes 🔒 - The staged entities of a changeset by what publishing does with them.
Enums§
- Publish
Outcome - Publish
Rejection - Why a publish was refused. Nothing was written.
- Write
Stop 🔒 - Why writing the staged entities stopped.
Constants§
- LOCK_
ORDER 🔒 - The order publishing locks the live rows of entity kinds in. Every publish uses it, so two publishes never deadlock on each other.
Functions§
- afters 🔒
- check_
publishable 🔒 - Locks what the changeset writes and checks that it may be published: no conflicts, no risk the publisher hasn’t reviewed, no exercise services the publisher may not add. The risk reasons it classifies again are stored, not put in the returned rows.
- delete_
removed 🔒 - Deletes the entities the changeset removes: chapters with their pages first, then the other pages, then modules, so that nothing still points at what is deleted next.
- embed_
staged_ 🔒settings - Embeds the texts the changeset’s staged course settings add or change; see
TextEmbeddings. - entity_
ref 🔒 - exercises_
switched_ 🔒to_ own_ review_ config - The staged exercises that switch from the course default review config to their own.
- lock_
live_ 🔒rows - Locks the live rows of the staged entities until the transaction ends, so that nothing changes them between the conflict check and the writes.
- move_
block_ 🔒references - Points feedback and edit proposals at the page their blocks moved to.
- publish
- Publishes an open changeset: writes every staged entity in one transaction, through the module and chapter writers, the CMS page save and the course save paths, and marks the changeset published.
- saved 🔒
resultof savingentity, with a save path’s refusal of what was staged asPublishRejection::SaveFailed.- with_
course_ 🔒default_ copies - The staged page with the exercises in
switchedgiven a new copy ofcourse_default, keeping the config id and review instructions staged: staging copied the default as it was then. - write_
staged 🔒 - Writes the staged entities in an order where nothing points at what doesn’t exist yet, records their history and returns the redirects created from changed page paths.
- written 🔒
- The staged snapshots of kind
T, each with its base.