PASS default Quiz denial preserves every synthetic data record
PASS default Assignment denial
PASS ordinary Page deletion is not blocked
PASS third-party assignment-like module is out of scope
PASS explicit Quiz grant does not grant Assignment deletion
PASS explicit Assignment grant does not grant Quiz deletion
PASS grants are scoped to the activity context
PASS site administrator bypass by default
PASS optional administrator lock ignores administrator capability bypass
PASS master disable returns before course queries
PASS config.php emergency switch returns before course queries
PASS uninstalled leftover code is inert
PASS Quiz type can be disabled independently
PASS Assignment type can be disabled independently
PASS all types disabled avoids course queries
PASS anonymous or actorless custom caller is not a deletion bypass
PASS hidden activities remain protected
PASS pre-existing pending deletion is blocked but never auto-unflagged
PASS core final deletion callback enforces policy
PASS whole-course callback checks protected content
PASS ordinary authenticated pages do not read configuration or database
PASS legacy UI module delete is rejected
PASS legacy UI edit and visibility requests remain untouched
PASS legacy UI section delete uses section ID, not number
PASS editing a section without delete remains untouched
PASS legacy UI course delete is rejected before mutation
PASS external API receives positional module IDs
PASS editor cm_delete is checked before a synthetic async queue step
PASS mixed bulk selection is checked before the first synthetic mutation
PASS editor section deletion is preflighted
PASS bulk section deletion expands every requested section
PASS course deletion API is preflighted
PASS non-destructive course editor actions have zero policy overhead
PASS unrelated external functions are not replaced
PASS permitted external function returns false to run native Moodle
PASS subsection deletion includes Quiz and nested Assignment descendants
PASS parent section deletion includes delegated descendants
PASS delegation with repeated instance IDs does not cross courses
PASS cyclic delegation terminates
PASS unknown or nonpositive IDs do not crash ordinary core validation
PASS log toggle suppresses events but not protection
PASS log failure never permits deletion
PASS diagnostics inspect registrations without mutations
PASS uninstall callback does not touch any data
PASS no role is automatically granted a destructive capability
PASS English and Arabic language keys and placeholders are aligned

46 isolated tests passed; 162 assertions.
This is NOT a live Moodle/SQL/browser test. See docs/TEST_REPORT.md.
