diff --git a/mod_form.php b/mod_form.php index b68998a0..3441f7d6 100644 --- a/mod_form.php +++ b/mod_form.php @@ -49,7 +49,12 @@ public function definition() { global $PAGE, $USER, $OUTPUT; // We don't do anything custom with completion data, so avoid doing any unnecessary work. - if ($PAGE->pagetype === 'course-editbulkcompletion' || $PAGE->pagetype === 'course-editdefaultcompletion') { + $completionpagetypes = [ + 'course-defaultcompletion' => 'Edit completion default settings (Moodle >= 4.3)', + 'course-editbulkcompletion' => 'Edit completion settings in bulk for a single course', + 'course-editdefaultcompletion' => 'Edit completion default settings (Moodle < 4.3)', + ]; + if (isset($completionpagetypes[$PAGE->pagetype])) { return; }