From 236387ab937208fb01c701a4d60e7865e10a01cf Mon Sep 17 00:00:00 2001 From: mattc-catalyst Date: Mon, 16 Apr 2007 21:43:05 +0000 Subject: [PATCH] Breadcrumbs: mod/journal changes - Modified to use build_navigation() for breadcrumb generation. Author: Matt Clarkson --- mod/journal/edit.php | 9 ++++++--- mod/journal/index.php | 5 ++++- mod/journal/report.php | 9 ++++++--- mod/journal/view.php | 7 +++++-- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/mod/journal/edit.php b/mod/journal/edit.php index 7d2045c17b..ea57ff6c88 100644 --- a/mod/journal/edit.php +++ b/mod/journal/edit.php @@ -75,9 +75,12 @@ $entry->format = $defaultformat; } - print_header_simple(format_string($journal->name), "", - "id\">$strjournals -> - id\">".format_string($journal->name,true)." -> $stredit", "", + $crumbs[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity'); + $crumbs[] = array('name' => format_string($journal->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance'); + $crumbs[] = array('name' => $stredit, 'link' => '', 'type' => 'action'); + $navigation = build_navigation($crumbs, $course); + + print_header_simple(format_string($journal->name), "", $navigation, "", "", true, "", navmenu($course, $cm)); echo "
\n"; diff --git a/mod/journal/index.php b/mod/journal/index.php index 2dbf763bf0..c5de71b197 100644 --- a/mod/journal/index.php +++ b/mod/journal/index.php @@ -16,8 +16,11 @@ $strjournals = get_string("modulenameplural", "journal"); $strweek = get_string("week"); $strtopic = get_string("topic"); + + $crumbs[] = array('name' => $strjournals, 'link' => '', 'type' => 'activity'); + $navigation = build_navigation($crumbs, $course); - print_header_simple("$strjournals", "", "$strjournals", + print_header_simple("$strjournals", "", $navigation, "", "", true, "", navmenu($course)); diff --git a/mod/journal/report.php b/mod/journal/report.php index 47f7179b42..3984042bb3 100644 --- a/mod/journal/report.php +++ b/mod/journal/report.php @@ -38,9 +38,12 @@ $strentries = get_string("entries", "journal"); $strjournals = get_string("modulenameplural", "journal"); - print_header_simple("$strjournals", "", - "id\">$strjournals -> - id\">".format_string($journal->name,true)." -> $strentries", "", "", true); + $crumbs[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity'); + $crumbs[] = array('name' => format_string($journal->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance'); + $crumbs[] = array('name' => $strentries, 'link' => '', 'type' => 'title'); + $navigation = build_navigation($crumbs, $course); + + print_header_simple("$strjournals", "", $navigation, "", "", true); /// Check to see if groups are being used in this journal diff --git a/mod/journal/view.php b/mod/journal/view.php index 0db45fdc02..4fe6dc1ebd 100644 --- a/mod/journal/view.php +++ b/mod/journal/view.php @@ -27,9 +27,12 @@ $strjournal = get_string("modulename", "journal"); $strjournals = get_string("modulenameplural", "journal"); + + $crumbs[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity'); + $crumbs[] = array('name' => format_string($journal->name), 'link' => '', 'type' => 'activityinstance'); + $navigation = build_navigation($crumbs, $course); - print_header_simple(format_string($journal->name), '', - "id\">$strjournals -> ".format_string($journal->name), '', '', true, + print_header_simple(format_string($journal->name), '', $navigation, '', '', true, update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm)); if (isteacher($course->id)) { -- 2.39.5