diff --git a/grade/edit/letter/index.php b/grade/edit/letter/index.php index b6140e5c84c..e709d971bb8 100644 --- a/grade/edit/letter/index.php +++ b/grade/edit/letter/index.php @@ -92,7 +92,7 @@ if (!$edit) { echo $renderer->render_action_bar($actionbar); echo $OUTPUT->heading($heading); } else { - print_grade_page_head($course->id, 'letter', 'view', $heading, false, false, + print_grade_page_head($course->id, 'letter', 'view', false, false, false, true, null, null, null, $actionbar); } diff --git a/grade/edit/scale/index.php b/grade/edit/scale/index.php index f9e6e18f637..6a21e7dab7e 100644 --- a/grade/edit/scale/index.php +++ b/grade/edit/scale/index.php @@ -172,7 +172,7 @@ if ($scales = grade_scale::fetch_all_global()) { $actionbar = new \core_grades\output\scales_action_bar($context); if ($courseid) { - print_grade_page_head($courseid, 'scale', 'scale', get_string('coursescales', 'grades'), + print_grade_page_head($courseid, 'scale', 'scale', false, false, false, true, null, null, null, $actionbar); } else { $renderer = $PAGE->get_renderer('core_grades'); diff --git a/grade/edit/settings/index.php b/grade/edit/settings/index.php index eac3a216d62..98602f60412 100644 --- a/grade/edit/settings/index.php +++ b/grade/edit/settings/index.php @@ -73,7 +73,7 @@ if ($data = $mform->get_data()) { } } -print_grade_page_head($courseid, 'settings', 'coursesettings', get_string('coursegradesettings', 'grades')); +print_grade_page_head($courseid, 'settings', 'coursesettings'); // The settings could have been changed due to a notice shown in print_grade_page_head, we need to refresh them. $settings = grade_get_settings($course->id); diff --git a/grade/edit/tree/index.php b/grade/edit/tree/index.php index ae874d56f0e..fd60ee21acd 100644 --- a/grade/edit/tree/index.php +++ b/grade/edit/tree/index.php @@ -246,8 +246,8 @@ if (grade_regrade_final_grades_if_required($course, $grade_edit_tree_index_check } $actionbar = new \core_grades\output\gradebook_setup_action_bar($context); -print_grade_page_head($courseid, 'settings', 'setup', get_string('gradebooksetup', 'grades'), - false, false, true, null, null, null, $actionbar, false); +print_grade_page_head($courseid, 'settings', 'setup', false, + false, false, true, null, null, null, $actionbar); // Print Table of categories and items echo $OUTPUT->box_start('gradetreebox generalbox'); diff --git a/grade/report/grader/index.php b/grade/report/grader/index.php index 3ba7858adac..96964c5f27d 100644 --- a/grade/report/grader/index.php +++ b/grade/report/grader/index.php @@ -138,8 +138,8 @@ $PAGE->requires->js_call_amd('gradereport_grader/collapse', 'init', [ $numusers = $report->get_numusers(true, true); $actionbar = new \gradereport_grader\output\action_bar($context, $report, $numusers); -print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons, true, - null, null, null, $actionbar, false); +print_grade_page_head($COURSE->id, 'report', 'grader', false, false, $buttons, true, + null, null, null, $actionbar); // make sure separate group does not prevent view if ($report->currentgroup == -2) { diff --git a/grade/report/grader/preferences.php b/grade/report/grader/preferences.php index e9e4e4c95ce..b20c1fa2ee9 100644 --- a/grade/report/grader/preferences.php +++ b/grade/report/grader/preferences.php @@ -62,7 +62,7 @@ if ($data = $mform->get_data()) { } } -print_grade_page_head($courseid, 'settings', 'grader', get_string('preferences', 'gradereport_grader')); +print_grade_page_head($courseid, 'settings', 'grader'); // If USER has admin capability, print a link to the site config page for this report if (has_capability('moodle/site:config', $systemcontext)) { diff --git a/grade/report/history/index.php b/grade/report/history/index.php index 469a2dec050..0c56d488c86 100644 --- a/grade/report/history/index.php +++ b/grade/report/history/index.php @@ -110,8 +110,7 @@ if ($table->is_downloading()) { // Print header. $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, +print_grade_page_head($COURSE->id, 'report', 'history', false, false, false, true, null, null, null, $actionbar); $mform->display(); diff --git a/grade/report/summary/index.php b/grade/report/summary/index.php index a90af79fd04..854cc909d02 100644 --- a/grade/report/summary/index.php +++ b/grade/report/summary/index.php @@ -47,7 +47,7 @@ require_capability('moodle/grade:viewall', $context); print_grade_page_head($courseid, 'report', 'summary', false, false, false, true, null, null, - null, null, false); + null, null); $report = system_report_factory::create(summary::class, context_course::instance($courseid)); diff --git a/grade/report/user/index.php b/grade/report/user/index.php index ffd16cac34a..b70773de593 100644 --- a/grade/report/user/index.php +++ b/grade/report/user/index.php @@ -130,13 +130,13 @@ if (has_capability('moodle/grade:viewall', $context)) { $actionbar = new \gradereport_user\output\action_bar($context, $userview, null, $currentgroup); // Print header. - print_grade_page_head($courseid, 'report', 'user', ' ', false, null, true, + print_grade_page_head($courseid, 'report', 'user', false, false, null, true, null, null, null, $actionbar); echo $report->output_report_zerostate(); } else if ($userid == 0) { // Show all reports. $actionbar = new \gradereport_user\output\action_bar($context, $userview, 0, $currentgroup); - print_grade_page_head($courseid, 'report', 'user', ' ', false, null, true, + print_grade_page_head($courseid, 'report', 'user', false, false, null, true, null, null, null, $actionbar); while ($userdata = $gui->next_user()) { @@ -177,7 +177,7 @@ if (has_capability('moodle/grade:viewall', $context)) { $userheading = $gradesrenderer->user_heading($report->user, $courseid, false); // Print the page. - print_grade_page_head($courseid, 'report', 'user', ' '); + print_grade_page_head($courseid, 'report', 'user'); echo $OUTPUT->heading($userheading); diff --git a/mod/lesson/tests/behat/link_to_gradebook.feature b/mod/lesson/tests/behat/link_to_gradebook.feature index e428bea9534..6f581479c3f 100644 --- a/mod/lesson/tests/behat/link_to_gradebook.feature +++ b/mod/lesson/tests/behat/link_to_gradebook.feature @@ -44,7 +44,6 @@ Feature: link to gradebook on the end of lesson page Then I should see "Congratulations - end of lesson reached" And I should see "View grades" And I follow "View grades" - And I should see "User report" in the "page-header" "region" And I should see "Student 1" in the "region-main" "region" And I should see "Test lesson"