Skip to content

Commit

Permalink
MDL-37679 Course: Adding section to page title on section only pages
Browse files Browse the repository at this point in the history
  • Loading branch information
polothy authored and jsnfwlr committed Dec 17, 2013
1 parent c9a3d37 commit c30533c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions course/view.php
Expand Up @@ -239,6 +239,14 @@
} }


$PAGE->set_title(get_string('course') . ': ' . $course->fullname); $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); $PAGE->set_heading($course->fullname);
echo $OUTPUT->header(); echo $OUTPUT->header();


Expand Down

0 comments on commit c30533c

Please sign in to comment.