Skip to content

Commit a3c0beb

Browse files
committed
Support missing get_suffix() in Moodle 4.1
1 parent 2ebf5ff commit a3c0beb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mod_form.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,12 @@ public function add_completion_rules() {
376376
* @return string
377377
*/
378378
protected function get_suffixed_name(string $fieldname): string {
379-
return "completion{$fieldname}_{$this->get_suffix()}";
379+
global $CFG;
380+
if ($CFG->version < 2023100900) {
381+
return "completion{$fieldname}";
382+
} else {
383+
return "completion{$fieldname}_{$this->get_suffix()}";
384+
}
380385
}
381386

382387
/**

0 commit comments

Comments
 (0)