diff --git a/mod_form.php b/mod_form.php index 2eea475..f24edb0 100644 --- a/mod_form.php +++ b/mod_form.php @@ -99,6 +99,7 @@ public function definition() { $mform->addElement('autocomplete', 'learningpathid', get_string('mform_select_learningpath', 'mod_adele'), $select, $options); + $mform->addRule('learningpathid', null, 'required', null, 'client'); $views = [ 1 => get_string('mform_options_view_top_level', 'mod_adele'), @@ -118,6 +119,7 @@ public function definition() { ]; $mform->addElement('autocomplete', 'participantslist', get_string('mform_select_participantslist', 'mod_adele'), $participantslist, ['multiple' => true]); + $mform->addRule('participantslist', null, 'required', null, 'client'); // Add standard elements. $this->standard_coursemodule_elements();