Skip to content

Commit 8f322d7

Browse files
committed
Comment out the explicit declaration of overrides with the new API methods as they make the code incompatible with older versions of moodle.
1 parent 8610646 commit 8f322d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backup/moodle2/restore_qtype_coderunner_plugin.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function process_coderunner_options($data) {
145145
}
146146

147147
// Add the extra methods required by MDL-83541.
148-
#[Override]
148+
// #[Override] // This breaks the restore at run time if used with older versions of moodle so commented out.
149149
public static function convert_backup_to_questiondata(array $backupdata): stdClass {
150150
$questiondata = parent::convert_backup_to_questiondata($backupdata);
151151
$qtype = $questiondata->qtype;
@@ -175,7 +175,7 @@ public static function convert_backup_to_questiondata(array $backupdata): stdCla
175175
return $questiondata;
176176
}
177177

178-
#[Override]
178+
// #[Override] // This breaks the restore at run time if used with older versions of moodle so commented out.
179179
protected function define_excluded_identity_hash_fields(): array {
180180
return [
181181
'/answers',
@@ -188,7 +188,7 @@ protected function define_excluded_identity_hash_fields(): array {
188188
];
189189
}
190190

191-
#[Override]
191+
// #[Override] // This breaks the restore at run time if used with older versions of moodle so commented out.
192192
public static function remove_excluded_question_data(stdClass $questiondata, array $excludefields = []): stdClass {
193193
if (isset($questiondata->options->customise)) {
194194
unset($questiondata->options->customise);

0 commit comments

Comments
 (0)