From 44ad175eda96f8e8f3c72fd9d37809af9fc4d001 Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Mon, 25 May 2015 11:26:26 +0530 Subject: [PATCH] MDL-50344 restore: Make restore file required --- backup/restorefile_form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/backup/restorefile_form.php b/backup/restorefile_form.php index f903415745b..eec70f9f73f 100644 --- a/backup/restorefile_form.php +++ b/backup/restorefile_form.php @@ -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); }