mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Fixed form cancellation handling
Previously, a cancelled form was processed as if all rubric definition was removed.
This commit is contained in:
parent
98a73bb7ac
commit
a990240b31
@ -48,8 +48,11 @@ $PAGE->requires->js('/grade/grading/form/rubric/js/rubriceditor.js');
|
||||
//TODO freeze rubric editor if needed
|
||||
$mform = new gradingform_rubric_editrubric(null, array('areaid' => $areaid, 'freezerubric' => optional_param('freeze', 0, PARAM_INT)));
|
||||
$mform->set_data($controller->get_definition_for_editing());
|
||||
if ($mform->is_submitted() && $mform->is_validated()) {
|
||||
$data = $mform->get_data();
|
||||
if ($mform->is_cancelled()) {
|
||||
// todo process editing cancel in a better way
|
||||
redirect($manager->get_management_url());
|
||||
|
||||
} else if ($data = $mform->get_data()) {
|
||||
$data = $controller->postupdate_definition_data($data);
|
||||
$controller->update_definition($data);
|
||||
redirect($PAGE->url);
|
||||
|
Loading…
x
Reference in New Issue
Block a user