mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-47146 core_grades: improve navigation on grade pages
Part of: MDL-46576
This commit is contained in:
parent
2917d45410
commit
6bf696bba2
@ -32,6 +32,8 @@ $id = optional_param('id', 0, PARAM_INT);
|
||||
|
||||
$PAGE->set_url('/grade/edit/scale/edit.php', array('id' => $id, 'courseid' => $courseid));
|
||||
$PAGE->set_pagelayout('admin');
|
||||
navigation_node::override_active_url(new moodle_url('/grade/edit/scale/index.php',
|
||||
array('id' => $courseid)));
|
||||
|
||||
$systemcontext = context_system::instance();
|
||||
$heading = '';
|
||||
@ -145,11 +147,7 @@ if ($mform->is_cancelled()) {
|
||||
redirect($returnurl);
|
||||
}
|
||||
|
||||
if ($courseid) {
|
||||
print_grade_page_head($course->id, 'scale', 'edit', $heading);
|
||||
} else {
|
||||
echo $OUTPUT->header();
|
||||
}
|
||||
print_grade_page_head($COURSE->id, 'scale', null, $heading, false, false, false);
|
||||
|
||||
$mform->display();
|
||||
|
||||
|
@ -769,7 +769,9 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
|
||||
$buttons = $OUTPUT->render($buttons);
|
||||
}
|
||||
$PAGE->set_button($buttons);
|
||||
grade_extend_settings($plugin_info, $courseid);
|
||||
if ($courseid != SITEID) {
|
||||
grade_extend_settings($plugin_info, $courseid);
|
||||
}
|
||||
|
||||
$returnval = $OUTPUT->header();
|
||||
if (!$return) {
|
||||
@ -782,7 +784,8 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
|
||||
}
|
||||
|
||||
if ($shownavigation) {
|
||||
if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_DROPDOWN) {
|
||||
if ($courseid != SITEID &&
|
||||
($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_DROPDOWN)) {
|
||||
$returnval .= print_grade_plugin_selector($plugin_info, $active_type, $active_plugin, $return);
|
||||
}
|
||||
|
||||
@ -792,7 +795,8 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
|
||||
echo $OUTPUT->heading($heading);
|
||||
}
|
||||
|
||||
if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_TABS) {
|
||||
if ($courseid != SITEID &&
|
||||
($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_TABS)) {
|
||||
$returnval .= grade_print_tabs($active_type, $active_plugin, $plugin_info, $return);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user