mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
MDL-72873 core_grades: Add general tertiary navigation
This commit is contained in:
parent
508fe3937e
commit
d1a0e4a95c
9 changed files with 415 additions and 68 deletions
|
@ -108,7 +108,11 @@ if ($table->is_downloading()) {
|
|||
}
|
||||
|
||||
// Print header.
|
||||
print_grade_page_head($COURSE->id, 'report', 'history', get_string('pluginname', 'gradereport_history'), false, '');
|
||||
$actionbar = new \core_grades\output\general_action_bar($context,
|
||||
new moodle_url('/grade/report/history/index.php', ['id' => $courseid]), 'report', 'history');
|
||||
print_grade_page_head($COURSE->id, 'report', 'history', get_string('pluginname',
|
||||
'gradereport_history'), false, false, true, null, null,
|
||||
null, $actionbar);
|
||||
$mform->display();
|
||||
|
||||
if ($showreport) {
|
||||
|
|
|
@ -90,6 +90,9 @@ $USER->grade_last_report[$course->id] = 'overview';
|
|||
// First make sure we have proper final grades.
|
||||
grade_regrade_final_grades_if_required($course);
|
||||
|
||||
$actionbar = new \core_grades\output\general_action_bar($context,
|
||||
new moodle_url('/grade/report/overview/index.php', ['id' => $courseid]), 'report', 'overview');
|
||||
|
||||
if (has_capability('moodle/grade:viewall', $context) && $courseid != SITEID) {
|
||||
// Please note this would be extremely slow if we wanted to implement this properly for all teachers.
|
||||
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
||||
|
@ -110,8 +113,8 @@ if (has_capability('moodle/grade:viewall', $context) && $courseid != SITEID) {
|
|||
}
|
||||
|
||||
if (empty($userid)) {
|
||||
// Add tabs
|
||||
print_grade_page_head($courseid, 'report', 'overview');
|
||||
print_grade_page_head($courseid, 'report', 'overview', false, false, false,
|
||||
true, null, null, null, $actionbar);
|
||||
|
||||
groups_print_course_menu($course, $gpr->get_return_url('index.php?id='.$courseid, array('userid'=>0)));
|
||||
|
||||
|
@ -124,7 +127,8 @@ if (has_capability('moodle/grade:viewall', $context) && $courseid != SITEID) {
|
|||
} else { // Only show one user's report
|
||||
$report = new grade_report_overview($userid, $gpr, $context);
|
||||
print_grade_page_head($courseid, 'report', 'overview', get_string('pluginname', 'gradereport_overview') .
|
||||
' - ' . fullname($report->user), false, false, true, null, null, $report->user);
|
||||
' - ' . fullname($report->user), false, false, true, null, null,
|
||||
$report->user, $actionbar);
|
||||
groups_print_course_menu($course, $gpr->get_return_url('index.php?id='.$courseid, array('userid'=>0)));
|
||||
|
||||
if ($user_selector) {
|
||||
|
@ -170,7 +174,8 @@ if (has_capability('moodle/grade:viewall', $context) && $courseid != SITEID) {
|
|||
}
|
||||
} else { // We have a course context. We must be navigating from the gradebook.
|
||||
print_grade_page_head($courseid, 'report', 'overview', get_string('pluginname', 'gradereport_overview')
|
||||
. ' - ' . fullname($report->user));
|
||||
. ' - ' . fullname($report->user), false, false, true, null, null,
|
||||
$report->user, $actionbar);
|
||||
if ($report->fill_table()) {
|
||||
echo '<br />' . $report->print_table(true);
|
||||
}
|
||||
|
|
|
@ -130,10 +130,16 @@ if ($data = data_submitted()) {
|
|||
}
|
||||
|
||||
$PAGE->set_pagelayout('report');
|
||||
|
||||
$actionbar = new \core_grades\output\general_action_bar($context,
|
||||
new moodle_url('/grade/report/singleview/index.php', ['id' => $courseid]), 'report', 'singleview');
|
||||
|
||||
if ($itemtype == 'user') {
|
||||
print_grade_page_head($course->id, 'report', 'singleview', $reportname, false, false, true, null, null, $report->screen->item);
|
||||
print_grade_page_head($course->id, 'report', 'singleview', $reportname, false, false,
|
||||
true, null, null, $report->screen->item, $actionbar);
|
||||
} else {
|
||||
print_grade_page_head($course->id, 'report', 'singleview', $reportname);
|
||||
print_grade_page_head($course->id, 'report', 'singleview', $reportname, false, false,
|
||||
true, null, null, null, $actionbar);
|
||||
}
|
||||
|
||||
$graderrightnav = $graderleftnav = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue