Expand description
Validating the blocks a call changed with the CMS, and writing back their normalised form.
Structs§
- Block
Finding - 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.
- Page
ToValidate 🔒 - The blocks of one page or instruction list that go to the validator.
- Validated
Blocks - What validating a write’s blocks found besides errors.
Enums§
- Validated
List 🔒 - A list of blocks the validator checks.
Functions§
- block_
error 🔒 - The error rejecting the call for the validator’s
errors;Nonewhen there are none. - blocks_
by_ 🔒id - Every block in
blocksby client id. - changeset_
block_ names - The block types in the trees
stagedchanged fromlive, which earlier calls of the changeset validated. - collect_
validation_ 🔒targets - The block trees of
afterthatvalidate_changed_blockssends. - replace_
roots 🔒 - Puts each of
rootsin 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
rootsthatis_unchangedholds for, given the block and whetherlive_blockshas it as it is. - validate_
changed_ blocks - Validates the top-level trees holding blocks that changed between
beforeandafterand replaces them with the validator’s normalised form; every tree of a page whose page type changed. Blocks aslivehas them, and thegenerated_blocksthe 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.