Merge branch 'MDL-50344-master' of git://github.com/ankitagarwal/moodle
authorDavid Monllao <davidm@moodle.com>
Tue, 26 May 2015 09:29:22 +0000 (17:29 +0800)
committerDavid Monllao <davidm@moodle.com>
Tue, 26 May 2015 09:29:22 +0000 (17:29 +0800)
backup/restorefile_form.php

index f903415..eec70f9 100644 (file)
@@ -30,6 +30,7 @@ class course_restore_form extends moodleform {
         $mform->addElement('hidden', 'contextid', $contextid);
         $mform->setType('contextid', PARAM_INT);
         $mform->addElement('filepicker', 'backupfile', get_string('files'));
+        $mform->addRule('backupfile', get_string('required'), 'required');
         $submit_string = get_string('restore');
         $this->add_action_buttons(false, $submit_string);
     }