Index: course/view.php =================================================================== --- course/view.php (date 1359069035000) +++ course/view.php (revision ) @@ -242,6 +242,17 @@ } $PAGE->set_title(get_string('course') . ': ' . $course->fullname); + + // If viewing a section, make the title more specific + if ($section and $section > 0) { + // Get section details and check it exists. + $modinfo = get_fast_modinfo($course); + $sectioninfo = $modinfo->get_section_info($section, MUST_EXIST); + $newtitle = $PAGE->title.', '.get_string('sectionname', "format_$course->format").': '. + get_section_name($course, $sectioninfo) + + $PAGE->set_title($newtitle); + } $PAGE->set_heading($course->fullname); echo $OUTPUT->header();