Skip to main content

Module course_structure

Module course_structure 

Source
Expand description

patch_course_structure: modules, chapters and pages, their order, names, titles, paths and chapter dates. Paths, chapter numbers and redirects are derived once at the end of a call.

Re-exportsยง

pub use model::CourseStructure;
pub use model::StructureChapter;
pub use model::StructureModule;
pub use model::StructurePage;
pub use outline::StructureOutline;
pub use outline::outline;
pub use paths::LinkToOldPath;

Modulesยง

editor ๐Ÿ”’
The editor that applies structure ops one by one to a copy of the course tree.
fields ๐Ÿ”’
The fields ops may set on modules, chapters and pages, and their value checks.
model ๐Ÿ”’
The course tree the structure tools read and edit, and the paths that address it.
outline ๐Ÿ”’
A compact account of what a structure call changed, for dry runs.
paths ๐Ÿ”’
Page URL paths: the ones a structure call derives at its end, and links to the old ones.

Structsยง

ChapterRenumber
A chapter whose number changed because chapters before it moved.
PageCopy
A page copy created; the caller copies the source pageโ€™s content to it.
StructureResult
The new state after a successful call. Nothing is stored until the caller stages it.

Functionsยง

apply
Applies ops in order to doc. In a live course (not a draft, not in test mode) new pages without content start hidden.