Moodle 4.4 requires custom completion rules to have a suffix "_$modname".
When Moodle checks if automatic completion is enabled here: https://github.com/moodle/moodle/blob/b132ff1ed83dbe243909b8b121304ab20c0f069c/completion/classes/form/form_trait.php#L403
mod_questionnaire checks the given $data object only for the rule name without the suffix:
|
public function completion_rule_enabled($data) { |
|
return !empty($data['completionsubmit']); |
|
} |
while earlier it did create the form elements with the suffix:
|
$mform =& $this->_form; |
|
$mform->addElement('checkbox', 'completionsubmit' . $suffix, '', |
|
get_string('completionsubmit', 'questionnaire')); |
|
return ['completionsubmit' . $suffix]; |
This leads to the bug that the custom completion rule can't be activated and therefore not be used (at least as a default)