MDL-72873 core_grades: Add tertiary navigation in course grade settings

This commit is contained in:
Mihail Geshoski
2021-12-16 00:10:13 +08:00
parent afbc8b2586
commit c94ba3eea5
2 changed files with 2 additions and 9 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ class course_settings_form extends moodleform {
$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);
$this->add_action_buttons();
$this->add_action_buttons(false);
}
}
+1 -8
View File
@@ -45,18 +45,13 @@ $gpr = new grade_plugin_return(array('type'=>'edit', 'plugin'=>'settings', 'cour
$strgrades = get_string('grades');
$pagename = get_string('coursesettings', 'grades');
$returnurl = $CFG->wwwroot.'/grade/index.php?id='.$course->id;
$mform = new course_settings_form();
$settings = grade_get_settings($course->id);
$mform->set_data($settings);
if ($mform->is_cancelled()) {
redirect($returnurl);
} else if ($data = $mform->get_data()) {
if ($data = $mform->get_data()) {
$data = (array)$data;
$general = array('displaytype', 'decimalpoints', 'aggregationposition', 'minmaxtouse');
foreach ($data as $key=>$value) {
@@ -76,8 +71,6 @@ if ($mform->is_cancelled()) {
grade_force_full_regrading($courseid);
}
}
redirect($returnurl);
}
print_grade_page_head($courseid, 'settings', 'coursesettings', get_string('coursegradesettings', 'grades'));