Merge branch 'MDL-37679-master' of git://github.com/phalacee/moodle

This commit is contained in:
Marina Glancy 2013-12-17 16:37:19 +11:00
commit 2280ad064d
2 changed files with 11 additions and 1 deletions

View file

@ -239,7 +239,15 @@
$PAGE->set_button($buttons);
}
$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)) {
$sectionname = get_string('sectionname', "format_$course->format");
$sectiontitle = get_section_name($course, $section);
$PAGE->set_title(get_string('coursesectiontitle', 'moodle', array('course' => $course->fullname, 'sectiontitle' => $sectiontitle, 'sectionname' => $sectionname)));
} else {
$PAGE->set_title(get_string('coursetitle', 'moodle', array('course' => $course->fullname)));
}
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();