This commit is contained in:
Sara Arjona 2023-08-24 17:35:03 +02:00
commit 556c286863
No known key found for this signature in database

View File

@ -42,8 +42,8 @@ class import_form extends moodleform {
$mform->setType('name', PARAM_TEXT);
// File upload.
$mform->addElement('filepicker', 'xmlfile',
get_string('selectfile', 'tool_admin_presets'));
$mform->addElement('filepicker', 'xmlfile', get_string('selectfile', 'tool_admin_presets'), null,
['accepted_types' => ['.xml']]);
$mform->addRule('xmlfile', null, 'required');
$this->add_action_buttons(true, get_string('import', 'tool_admin_presets'));