mirror of
https://github.com/moodle/moodle.git
synced 2025-04-05 08:23:01 +02:00
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:
parent
a09eb2697f
commit
39e777e3f7
@ -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;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user