MDL-9615: Correct incorrect use of term breadcrumbs

- $crumbs -> $navlinks


Author: Matt Clarkson <mattc@catalyst.net.nz>
This commit is contained in:
mattc-catalyst 2007-07-05 04:40:48 +00:00
parent 7994464178
commit 3b27b0fe21
99 changed files with 471 additions and 547 deletions

View file

@ -28,8 +28,8 @@
$strlastmodified = get_string("lastmodified");
$crumbs[] = array('name' => $strresources, 'link' => '', 'type' => 'activityinstance');
$navigation = build_navigation($crumbs);
$navlinks[] = array('name' => $strresources, 'link' => '', 'type' => 'activityinstance');
$navigation = build_navigation($navlinks);
print_header("$course->shortname: $strresources", $course->fullname, $navigation,
"", "", true, "", navmenu($course));

View file

@ -112,12 +112,12 @@ function resource_base($cmid=0) {
$this->strresource = get_string("modulename", "resource");
$this->strresources = get_string("modulenameplural", "resource");
$this->crumbs[] = array('name' => $this->strresources, 'link' => "index.php?id={$this->course->id}", 'type' => 'activity');
$this->navlinks[] = array('name' => $this->strresources, 'link' => "index.php?id={$this->course->id}", 'type' => 'activity');
if (!$this->cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_MODULE, $this->cm->id))) {
$pagetitle = strip_tags($this->course->shortname.': '.$this->strresource);
$this->crumbs[] = array('name' => $this->strresource, 'link' => '', 'type' => 'activityinstance');
$this->navigation = build_navigation($this->crumbs);
$this->navlinks[] = array('name' => $this->strresource, 'link' => '', 'type' => 'activityinstance');
$this->navigation = build_navigation($this->navlinks);
print_header($pagetitle, $this->course->fullname, $this->navigation, "", "", true, '', navmenu($this->course, $this->cm));
notice(get_string("activityiscurrentlyhidden"), "$CFG->wwwroot/course/view.php?id={$this->course->id}");
@ -163,10 +163,10 @@ function display_course_blocks_start() {
$USER->editing = $edit;
}
$morebreadcrumbs = array($this->strresources => 'index.php?id='.$this->course->id,
$morenavlinks = array($this->strresources => 'index.php?id='.$this->course->id,
$this->resource->name => '');
$PAGE->print_header($this->course->shortname.': %fullname%', $morebreadcrumbs);
$PAGE->print_header($this->course->shortname.': %fullname%', $morenavlinks);
echo '<table id="layout-table"><tr>';

View file

@ -63,20 +63,20 @@ function display() {
$count = 0;
$subnav = "<a href=\"view.php?id={$cm->id}\">".format_string($resource->name,true)."</a>";
$backsub = '';
$this->crumbs[] = array('name' => format_string($resource->name,true), 'link' => "view.php?id={$cm->id}", 'type' => 'activity');
$this->navlinks[] = array('name' => format_string($resource->name,true), 'link' => "view.php?id={$cm->id}", 'type' => 'activity');
foreach ($subs as $sub) {
$count++;
if ($count < $countsubs) {
$backsub .= "/$sub";
$this->crumbs[] = array('name' => $sub, 'link' => "view.php?id={$cm->id}", 'type' => 'title');
$this->navlinks[] = array('name' => $sub, 'link' => "view.php?id={$cm->id}", 'type' => 'title');
} else {
$this->crumbs[] = array('name' => $sub, 'link' => '', 'type' => 'title');
$this->navlinks[] = array('name' => $sub, 'link' => '', 'type' => 'title');
}
}
} else {
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activity');
$this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activity');
}
$pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));
@ -87,7 +87,7 @@ function display() {
$editfiles = print_single_button("$CFG->wwwroot/files/index.php", $options, get_string("editfiles"), 'get', '', true);
$update = $editfiles.$update;
}
$this->navigation = build_navigation($this->crumbs);
$this->navigation = build_navigation($this->navlinks);
print_header($pagetitle, $course->fullname, $this->navigation,
"", "", true, $update,
navmenu($course, $cm));

View file

@ -84,8 +84,8 @@ function display() {
print_footer($course);
} else { /// Make a page and a pop-up window
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
$this->navigation = build_navigation($this->crumbs);
$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, update_module_button($cm->id, $course->id, $this->strresource),
@ -113,8 +113,8 @@ function display() {
}
} else { /// not a popup at all
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
$this->navigation = build_navigation($this->crumbs);
$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, update_module_button($cm->id, $course->id, $this->strresource),

View file

@ -64,9 +64,9 @@
print_header($pagetitle, $course->fullname);
} else {
$resource_obj->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
$resource_obj->crumbs[] = array('name' => $strdeploy, 'link' => '', 'type' => 'action');
$navigation = build_navigation($resource_obj->crumbs);
$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);
print_header($pagetitle, $course->fullname, $navigation,
'', '', true,
update_module_button($cm->id, $course->id, $resource_obj->strresource));

View file

@ -373,8 +373,8 @@ class resource_ims extends resource_base {
print_header($pagetitle, $course->fullname.' : '.$resource->name);
} else {
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
$this->navigation = build_navigation($this->crumbs);
$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, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));
}
@ -474,8 +474,8 @@ class resource_ims extends resource_base {
//print_header($pagetitle, $course->fullname.' : '.$resource->name);
print_header();
} else {
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
$this->navigation = build_navigation($this->crumbs);
$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, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent"));
}
/// content - this produces everything else

View file

@ -110,8 +110,8 @@ function display() {
} else { /// not a popup at all
add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'title');
$this->navigation = build_navigation($this->crumbs);
$this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'title');
$this->navigation = build_navigation($this->navlinks);
print_header($pagetitle, $course->fullname, $this->navigation,
"", "", true, update_module_button($cm->id, $course->id, $this->strresource),