mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02: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
1 changed files with 5 additions and 2 deletions
|
@ -48,8 +48,11 @@ $PAGE->requires->js('/grade/grading/form/rubric/js/rubriceditor.js');
|
||||||
//TODO freeze rubric editor if needed
|
//TODO freeze rubric editor if needed
|
||||||
$mform = new gradingform_rubric_editrubric(null, array('areaid' => $areaid, 'freezerubric' => optional_param('freeze', 0, PARAM_INT)));
|
$mform = new gradingform_rubric_editrubric(null, array('areaid' => $areaid, 'freezerubric' => optional_param('freeze', 0, PARAM_INT)));
|
||||||
$mform->set_data($controller->get_definition_for_editing());
|
$mform->set_data($controller->get_definition_for_editing());
|
||||||
if ($mform->is_submitted() && $mform->is_validated()) {
|
if ($mform->is_cancelled()) {
|
||||||
$data = $mform->get_data();
|
// 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);
|
$data = $controller->postupdate_definition_data($data);
|
||||||
$controller->update_definition($data);
|
$controller->update_definition($data);
|
||||||
redirect($PAGE->url);
|
redirect($PAGE->url);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue