MDL-80043 grade: Use heading parameter for the page title if provided
This commit is contained in:
+4
-2
@@ -930,14 +930,16 @@ function print_grade_page_head(int $courseid, string $active_type, ?string $acti
|
||||
}
|
||||
$coursecontext = context_course::instance($courseid);
|
||||
// Title will be constituted by information starting from the unique identifying information for the page.
|
||||
if (in_array($active_type, ['report', 'settings'])) {
|
||||
if ($heading) {
|
||||
// If heading is supplied, use this for the page title.
|
||||
$uniquetitle = $heading;
|
||||
} else if (in_array($active_type, ['report', 'settings'])) {
|
||||
$uniquetitle = $stractive_plugin;
|
||||
} else {
|
||||
$uniquetitle = $stractive_type . ': ' . $stractive_plugin;
|
||||
}
|
||||
$titlecomponents = [
|
||||
$uniquetitle,
|
||||
get_string('grades'),
|
||||
$coursecontext->get_context_name(false),
|
||||
];
|
||||
$PAGE->set_title(implode(moodle_page::TITLE_SEPARATOR, $titlecomponents));
|
||||
|
||||
Reference in New Issue
Block a user