Skip to main content

Module entity_snapshots

Module entity_snapshots 

Source
Expand description

Full snapshots of course content entities.

Agent changesets stage these, entity_history stores them, and publishing and restoring write them back through the existing save paths. A snapshot holds every field its save path writes, so writing back an unchanged snapshot is a no-op.

Modules§

content_entity 🔒
loading 🔒
types 🔒

Structs§

ChapterSnapshot
CourseAudienceSnapshot
CourseDefaultReviewConfigSnapshot
The peer and self review settings of a course that exercises use unless they have their own. Agents edit only the instructions; the other settings are left out.
CourseSettingsSnapshot
The course’s own settings: the editable fields of the courses row and its audiences.
EntityKey
An entity kind and id, which together identify one content entity.
EntityRef
A content entity and what people call it.
ExerciseBundle
One exercise of a page snapshot with its slides and tasks.
GlossaryTermSnapshot
ModuleSnapshot
A course module’s structure fields and settings.
PageSnapshot
A course page: its metadata, its stored blocks and its exercises, in the shape the CMS page save takes. Exercise blocks in content are stored stripped to their id, as the CMS stores them; the exercises themselves are in exercises, exercise_slides and exercise_tasks.
ReferenceSnapshot

Enums§

ContentEntityType
A kind of course content entity that agent changesets stage and history records.
EntitySnapshot
A snapshot of any entity type an agent changeset can hold. Serialised as the bare snapshot; stored ones are parsed with EntitySnapshot::from_json, which knows the type.

Functions§

course_settings_of
The settings of a fetched course; only its audiences are read.
exercise_bundles
Each exercise in exercise order, with its slides and tasks.
load_course_default_review_config
The course’s default review config, if it has one.
load_live
load_live_many of one entity.
load_live_many
The live state of each entity, None for one that does not exist or is deleted. Pages that belong to an exam are treated as not existing: changesets only hold course content.
load_page
The live page, as load_live_many has it.
load_pages
The live pages, as load_live_many has them, by id; the pages that don’t exist are left out.