MDL-72873 core_grades: Add tertiary nav in grader report preferences

This commit is contained in:
Mihail Geshoski 2021-10-30 00:48:55 +08:00
parent c94ba3eea5
commit 4f403bfdca
2 changed files with 2 additions and 9 deletions

View File

@ -48,7 +48,7 @@ require('preferences_form.php');
$mform = new grader_report_preferences_form('preferences.php', compact('course'));
// If data submitted, then process and store.
if (!$mform->is_cancelled() && $data = $mform->get_data()) {
if ($data = $mform->get_data()) {
foreach ($data as $preference => $value) {
if (substr($preference, 0, 6) !== 'grade_') {
continue;
@ -60,13 +60,6 @@ if (!$mform->is_cancelled() && $data = $mform->get_data()) {
set_user_preference($preference, $value);
}
}
redirect($CFG->wwwroot . '/grade/report/grader/index.php?id='.$courseid); // message here breaks accessability and is sloooowww
exit;
}
if ($mform->is_cancelled()){
redirect($CFG->wwwroot . '/grade/report/grader/index.php?id='.$courseid);
}
print_grade_page_head($courseid, 'settings', 'grader', get_string('preferences', 'gradereport_grader'));

View File

@ -190,7 +190,7 @@ class grader_report_preferences_form extends moodleform {
$mform->setType('id', PARAM_INT);
$mform->setDefault('id', $course->id);
$this->add_action_buttons();
$this->add_action_buttons(false);
}
/// perform some extra moodle validation