Skip to main content

Module validation

Module validation 

Source
Expand description

Validating the blocks a call changed with the CMS, and writing back their normalised form.

Structs§

BlockFinding
A validator finding with the page or instruction list it was found in: an error, or a warning on a teacher’s block the call left as it was.
PageToValidate 🔒
The blocks of one page or instruction list that go to the validator.
ValidatedBlocks
What validating a write’s blocks found besides errors.

Enums§

ValidatedList 🔒
A list of blocks the validator checks.

Functions§

block_error 🔒
The error rejecting the call for the validator’s errors; None when there are none.
blocks_by_id 🔒
Every block in blocks by client id.
changeset_block_names
The block types in the trees staged changed from live, which earlier calls of the changeset validated.
collect_validation_targets 🔒
The block trees of after that validate_changed_blocks sends.
replace_roots 🔒
Puts each of roots in place of the top-level block with its id.
top_level_pages_hold_no_chapter_blocks 🔒
Publishing refuses pages outside chapters that hold exercises or chapter listings.
unchanged_blocks 🔒
The ids of the blocks in roots that is_unchanged holds for, given the block and whether live_blocks has it as it is.
validate_changed_blocks
Validates the top-level trees holding blocks that changed between before and after and replaces them with the validator’s normalised form; every tree of a page whose page type changed. Blocks as live has them, and the generated_blocks the server wrote, are sent as unchanged, so that problems in them only warn.
write_back_normalised 🔒
Puts the validator’s normalised trees in place of the ones sent.