Skip to content

Commit

Permalink
mod_form: bypass completion defaults issue in Moodle 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchamp committed Dec 13, 2023
1 parent d4db341 commit e64f1ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e64f1ad

Please sign in to comment.