Merging in navigation to breadcrumb conversion fix for MDL-8843

This commit is contained in:
mark-nielsen
2007-03-12 23:04:07 +00:00
parent 55c548682f
commit ccfe8fddfe
+11 -1
View File
@@ -282,8 +282,18 @@ function lesson_print_header($cm, $course, $lesson, $currenttab = '') {
$navigation[$strlessons] = "$CFG->wwwroot/mod/lesson/index.php?id=$course->id";
$navigation[$strname] = '';
$urls = array();
foreach($navigation as $text => $href) {
if (empty($href)) {
$urls[] = $text;
} else {
$urls[] = '<a href="'.$href.'">'.$text.'</a>';
}
}
$breadcrumb = implode(' -> ', $urls);
/// Print header, heading, tabs and messages
print_header("$course->shortname: $strname", $course->fullname, $navigation,
print_header("$course->shortname: $strname", $course->fullname, $breadcrumb,
'', $meta, true, $button, navmenu($course, $cm));
if (has_capability('mod/lesson:manage')) {