Index: mod/chat/report.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/chat/report.php,v retrieving revision 1.37 diff -u -r1.37 report.php --- mod/chat/report.php 27 Aug 2007 02:28:36 -0000 1.37 +++ mod/chat/report.php 12 Oct 2007 15:30:56 -0000 @@ -39,13 +39,7 @@ /// Print a session if one has been specified if ($start and $end and !$confirmdelete) { // Show a full transcript - - $navlinks[] = array('name' => $strchats, 'link' => "index.php?id=$course->id", 'type' => 'activity'); - $navlinks[] = array('name' => format_string($chat->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance'); - $navlinks[] = array('name' => $strchatreport, 'link' => "report.php?id=$cm->id", 'type' => 'title'); - - $navigation = build_navigation($navlinks); - + $navigation = build_navigation($strchatreport, $cm); print_header_simple(format_string($chat->name).": $strchatreport", '', $navigation, '', '', true, '', navmenu($course, $cm)); @@ -95,12 +89,7 @@ /// Print the Sessions display - $navlinks[] = array('name' => $strchats, 'link' => "index.php?id=$course->id", 'type' => 'activity'); - $navlinks[] = array('name' => format_string($chat->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance'); - $navlinks[] = array('name' => $strchatreport, 'link' => '', 'type' => 'title'); - - $navigation = build_navigation($navlinks); - + $navigation = build_navigation($strchatreport, $cm); print_header_simple(format_string($chat->name).": $strchatreport", '', $navigation, '', '', true, '', navmenu($course, $cm)); Index: mod/survey/report.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/survey/report.php,v retrieving revision 1.53 diff -u -r1.53 report.php --- mod/survey/report.php 28 Aug 2007 00:12:03 -0000 1.53 +++ mod/survey/report.php 12 Oct 2007 15:31:02 -0000 @@ -65,12 +65,7 @@ id\">".format_string($survey->name,true)." -> "; } - $navlinks = array(); - $navlinks[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity'); - $navlinks[] = array('name' => format_string($survey->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance'); - $navlinks[] = array('name' => $strreport, 'link' => '', 'type' => 'title'); - $navigation = build_navigation($navlinks); - + $navigation = build_navigation($strreport, $cm); print_header("$course->shortname: ".format_string($survey->name), $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm)); Index: mod/survey/view.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/survey/view.php,v retrieving revision 1.53 diff -u -r1.53 view.php --- mod/survey/view.php 28 Aug 2007 00:12:03 -0000 1.53 +++ mod/survey/view.php 12 Oct 2007 15:31:02 -0000 @@ -34,14 +34,7 @@ $showscales = ($template->name != 'ciqname'); - $strsurveys = get_string("modulenameplural", "survey"); - $strsurvey = get_string("modulename", "survey"); - - $navlinks = array(); - $navlinks[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');; - $navlinks[] = array('name' => format_string($survey->name), 'link' => '', 'type' => 'activityinistance'); - $navigation = build_navigation($navlinks); - + $navigation = build_navigation('', $cm); print_header_simple(format_string($survey->name), "", $navigation, "", "", true, update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm)); Index: mod/survey/save.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/survey/save.php,v retrieving revision 1.26 diff -u -r1.26 save.php --- mod/survey/save.php 5 Jul 2007 04:55:36 -0000 1.26 +++ mod/survey/save.php 12 Oct 2007 15:31:02 -0000 @@ -31,14 +31,7 @@ add_to_log($course->id, "survey", "submit", "view.php?id=$cm->id", "$survey->id", "$cm->id"); - $strsurveys = get_string("modulenameplural", "survey"); - $strsurveysaved = get_string("surveysaved", "survey"); - $navlinks = array(); - $navlinks[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity'); - $navlinks[] = array('name' => format_string($survey->name), 'link' => '', 'type' => 'activityinstance'); - $navlinks[] = array('name' => $strsurveysaved, 'link' => '', 'type' => 'title'); - $navigation = build_navigation($navlinks); - + $navigation = build_navigation($strsurveysaved, $cm); print_header_simple("$strsurveysaved", "", $navigation, ""); Index: mod/resource/type/ims/deploy.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/resource/type/ims/deploy.php,v retrieving revision 1.24 diff -u -r1.24 deploy.php --- mod/resource/type/ims/deploy.php 10 Oct 2007 05:25:24 -0000 1.24 +++ mod/resource/type/ims/deploy.php 12 Oct 2007 15:31:01 -0000 @@ -64,9 +64,8 @@ print_header($pagetitle, $course->fullname); } else { - $resource_obj->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance'); $resource_obj->navlinks[] = array('name' => $strdeploy, 'link' => '', 'type' => 'action'); - $navigation = build_navigation($resource_obj->navlinks); + $navigation = build_navigation($resource_obj->navlinks, $cm); print_header($pagetitle, $course->fullname, $navigation, '', '', true, update_module_button($cm->id, $course->id, $resource_obj->strresource)); Index: mod/resource/type/ims/resource.class.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/resource/type/ims/resource.class.php,v retrieving revision 1.47 diff -u -r1.47 resource.class.php --- mod/resource/type/ims/resource.class.php 10 Oct 2007 05:25:24 -0000 1.47 +++ mod/resource/type/ims/resource.class.php 12 Oct 2007 15:31:01 -0000 @@ -372,11 +372,8 @@ if ($inpopup) { print_header($pagetitle, $course->fullname.' : '.$resource->name); } else { - - $this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance'); - $this->navigation = build_navigation($this->navlinks); - - print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, + $navigation = build_navigation($this->navlinks, $cm); + print_header($pagetitle, $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm)); } print_simple_box_start('center', '60%'); @@ -426,10 +423,9 @@ /// Check whether this is supposed to be a popup, but was called directly if (empty($frameset) && $resource->popup && !$inpopup) { /// Make a page and a pop-up window - $this->navlinks[] = array('name' => format_string($resource->name), 'link' => null, 'type' => 'misc'); - $this->navigation = build_navigation($this->navlinks); + $navigation = build_navigation($this->navlinks, $cm); - print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, + print_header($pagetitle, $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm)); echo "\n'."\n"; - $navlinks = array(); - $navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity'); - $navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance'); - $navigation = build_navigation($navlinks); - + $navigation = build_navigation('', $cm); print_header_simple($data->name, '', $navigation, '', $meta, true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')), navmenu($course, $cm), '', $bodytag); Index: mod/data/view.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/data/view.php,v retrieving revision 1.70 diff -u -r1.70 view.php --- mod/data/view.php 16 Sep 2007 18:49:43 -0000 1.70 +++ mod/data/view.php 12 Oct 2007 15:30:57 -0000 @@ -92,13 +92,7 @@ /// If it's hidden then it's don't show anything. :) if (empty($cm->visible) and !has_capability('mod/data:managetemplates', $context)) { - $strdatabases = get_string("modulenameplural", "data"); - - $navlinks = array(); - $navlinks[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity'); - $navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance'); - $navigation = build_navigation($navlinks); - + $navigation = build_navigation('', $cm); print_header_simple(format_string($data->name), "", $navigation, "", "", true, '', navmenu($course, $cm)); notice(get_string("activityiscurrentlyhidden")); Index: mod/resource/type/repository/resource.class.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/resource/type/repository/resource.class.php,v retrieving revision 1.21 diff -u -r1.21 resource.class.php --- mod/resource/type/repository/resource.class.php 17 Aug 2007 19:09:23 -0000 1.21 +++ mod/resource/type/repository/resource.class.php 12 Oct 2007 15:31:01 -0000 @@ -244,10 +244,7 @@ $resourcetype = "html"; } } - - - $this->navlinks[] = array('name' => format_string($resource->name), 'link' => null, 'type' => 'misc'); - $this->navigation = build_navigation($this->navlinks); + $navigation = build_navigation($this->navlinks, $cm); /// Form the parse string if (!empty($resource->alltext)) { @@ -280,7 +277,7 @@ if ($inpopup) { print_header($pagetitle, $course->fullname); } else { - print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, + print_header($pagetitle, $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm)); } notify('You do not have access to HarvestRoad Hive. This resource is unavailable.'); @@ -299,7 +296,7 @@ if ($inpopup) { print_header($pagetitle, $course->fullname); } else { - print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, + print_header($pagetitle, $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm)); } notify(get_string('notallowedlocalfileaccess', 'resource', '')); @@ -314,7 +311,7 @@ /// Check whether this is supposed to be a popup, but was called directly if ($resource->popup and !$inpopup) { /// Make a page and a pop-up window - print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, + print_header($pagetitle, $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm)); @@ -373,7 +370,7 @@ /// If we are in a frameset, just print the top of it if (!empty($frameset) and $frameset == "top") { - print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, + print_header($pagetitle, $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent")); echo '