v1.0.26-beta — implements the Backup/Restore API so the per-assignment AI Grader Pro configuration (evaluation criteria, model override, language override) is preserved when a course is backed up, duplicated via Course Reuse ' Import, or restored on another Moodle site. Fixes the high-severity finding from the Plugin Directory peer review by @volodymyrdovhan (GitHub Issue #1).
Two new files under backup/moodle2/:
- backup_local_aigrader_plugin.class.php — extends backup_local_plugin, hooks into mod_assign's backup task via define_module_plugin_structure(), short-circuits for any non-assign module, annotates usermodified for cross-site user remapping.
- restore_local_aigrader_plugin.class.php — extends restore_local_plugin, re-creates the config row bound to the new assignid, re-maps usermodified (fallback to restoring user), applies date offset, defensively updates in place if a config already exists.
Scope: only the per-assignment configuration is backed up. The student-data tables (local_aigrader_submission proposals, local_aigrader_log audit entries) need assign_submission id-mapping plumbing and are planned for v1.0.27. Restoring a course re-creates the AI Grader Pro setup but does not carry prior grading history; re-running "Grade with AI" on the restored submissions re-creates it.
TESTPLAN.md scenario 19 added covering same-site backup'restore, course duplication, cross-site restore with the plugin installed, and cross-site restore without the plugin installed (the XML data is silently ignored, no error).
CI strict-green: 0 phpcs errors, 0 phpdoc errors on the new files.