MDL-80498 group: Added required rule for filepicker field

This commit is contained in:
Santosh Nagargoje 2023-12-29 09:53:49 +05:30
parent 580c009cac
commit bfc9f17686

View file

@ -53,6 +53,7 @@ class groups_import_form extends moodleform {
$filepickeroptions['filetypes'] = '*';
$filepickeroptions['maxbytes'] = get_max_upload_file_size();
$mform->addElement('filepicker', 'userfile', get_string('import'), null, $filepickeroptions);
$mform->addRule('userfile', null, 'required');
$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);