MDL-37679 Course: Adding section to page title on section only pages

This commit is contained in:
Mark Nielsen
2013-12-17 11:43:13 +08:00
committed by Jason Fowler
parent 8e92813abe
commit e345a21c96
+8
View File
@@ -239,6 +239,14 @@
}
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
// If viewing a section, make the title more specific
if ($section and $section > 0 and course_format_uses_sections($course->format)) {
// Get section details and check it exists.
$newtitle = $PAGE->title.', '.get_string('sectionname', "format_$course->format").': '.
get_section_name($course, $section);
$PAGE->set_title($newtitle);
}
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();