MDL-72873 core_grades: Add tertiary navigation in course grade settings
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user