Skip to main content

Module document_schema_processor

Module document_schema_processor 

Source

Macrosยง

attributes

Structsยง

GutenbergBlock

Staticsยง

DISALLOWED_BLOCKS_IN_TOP_LEVEL_PAGES ๐Ÿ”’
Blocks that are not allowed in top-level pages (pages without chapter_id). Note: This is NOT for chapter front pages. Chapter front pages can contain these blocks.

Functionsยง

blocks_text_content ๐Ÿ”’
The text a block and everything nested inside it carries, one entry per block that has any.
collect_learning_objectives ๐Ÿ”’
contains_blocks_not_allowed_in_top_level_pages
Checks if blocks contain any that are not allowed in top-level pages (pages without chapter_id). Note: This is NOT for chapter front pages. Chapter front pages can contain these blocks.
filter_lock_chapter_blocks
Filters lock-chapter blocksโ€™ inner blocks based on whether the chapter is locked. If the chapter is not locked, inner blocks are removed to prevent unauthorized access. This function recursively processes all blocks to handle nested structures.
get_learning_objectives
The learning objectives declared anywhere in blocks, one per line, or None when the page declares none.
remap_ids_in_content
remove_sensitive_attributes
Removes the private spec from exercise tasks.
replace_duplicate_client_ids
Replaces duplicate client IDs with new unique IDs in Gutenberg blocks.
replace_duplicate_client_ids_inner ๐Ÿ”’
validate_unique_client_ids
Validates that all client IDs in the Gutenberg blocks are unique. Returns an error if duplicate client IDs are found.
validate_unique_client_ids_inner ๐Ÿ”’