Skip to content

Commit 627912a

Browse files
author
Matthias Opitz
committed
Abort definition() if page output has already begun
1 parent e506f9e commit 627912a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mod_form.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ class mod_turnitintooltwo_mod_form extends moodleform_mod {
3434
private $turnitintooltwo;
3535

3636
public function definition() {
37-
global $DB, $USER, $COURSE;
37+
global $DB, $USER, $COURSE, $PAGE;
38+
39+
// Abort if output of page has begun as otherwise it will break page.
40+
// This is most likely because of the redesign of the Default activity completion page in Moodle 4.3 (MDL-78528).
41+
if ($PAGE->state > 0) {
42+
return false;
43+
}
3844

3945
// Module string is useful for product support.
4046
$modulestring = '<!-- Turnitin Moodle Direct Version: '.turnitintooltwo_get_version().' - (';

0 commit comments

Comments
 (0)