Skip to content

Commit

Permalink
Merge pull request #555 from jrchamp/fix/moodle-403-completion
Browse files Browse the repository at this point in the history
mod_form: bypass completion defaults issue in Moodle 4.3
  • Loading branch information
smbader authored Dec 14, 2023
2 parents d4db341 + e64f1ad commit 7200b5d
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 7200b5d

Please sign in to comment.