MDL-67548 core_course: Remove category deletion form artefact.

This is not usable for the reason that categorylabel element does not
exist.
This commit is contained in:
Ruslan Kabalin 2020-05-01 17:19:55 +01:00
parent a09eb2697f
commit 39e777e3f7

View File

@ -111,10 +111,6 @@ class core_course_deletecategory_form extends moodleform {
$mform->setType('categoryid', PARAM_ALPHANUM);
$mform->addElement('hidden', 'action', 'deletecategory');
$mform->setType('action', PARAM_ALPHANUM);
$mform->addElement('hidden', 'sure');
// This gets set by default to ensure that if the user changes it manually we can detect it.
$mform->setDefault('sure', md5(serialize($this->coursecat)));
$mform->setType('sure', PARAM_ALPHANUM);
$this->add_action_buttons(true, get_string('delete'));
}
@ -133,10 +129,6 @@ class core_course_deletecategory_form extends moodleform {
$errors['newparent'] = get_string('required');
}
if ($data['sure'] !== md5(serialize($this->coursecat))) {
$errors['categorylabel'] = get_string('categorymodifiedcancel');
}
return $errors;
}
}