Index: mod/resource/lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/resource/lib.php,v
retrieving revision 1.70.2.11
diff -u -F ^f -r1.70.2.11 lib.php
--- mod/resource/lib.php 17 Jun 2008 01:47:58 -0000 1.70.2.11
+++ mod/resource/lib.php 10 Jul 2008 09:07:31 -0000
@@ -102,10 +102,8 @@
$USER->editing = $edit;
}
- $morenavlinks = array($this->strresources => 'index.php?id='.$this->course->id,
- $this->resource->name => '');
-
- $PAGE->print_header($this->course->shortname.': %fullname%', $morenavlinks, "", "",
+ $this->navlinks[] = array('name' => format_string($this->resource->name), 'link' => '', 'type' => 'activityinstance');
+ $PAGE->print_header($this->course->shortname.': %fullname%', $this->navlinks, "", "",
update_module_button($this->cm->id, $this->course->id, $this->strresource));
echo '
';
Index: mod/resource/type/html/resource.class.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/resource/type/html/resource.class.php,v
retrieving revision 1.40.2.3
diff -u -F ^f -r1.40.2.3 resource.class.php
--- mod/resource/type/html/resource.class.php 1 Jul 2008 22:25:26 -0000 1.40.2.3
+++ mod/resource/type/html/resource.class.php 10 Jul 2008 09:07:31 -0000
@@ -57,7 +57,7 @@ function display() {
// fix for MDL-9021, thanks Etienne Roz
// fix for MDL-15387, thanks to John Beedell
- add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
+ //add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
/// Are we displaying the course blocks?
if ($this->resource->options == 'showblocks') {
@@ -78,12 +78,14 @@ function display() {
if ($resource->popup) {
if ($inpopup) { /// Popup only
+ add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
print_header();
print_simple_box(format_text($resource->alltext, FORMAT_HTML, $formatoptions, $course->id),
"center clearfix", "", "", "20");
print_footer($course);
} else { /// Make a page and a pop-up window
+ add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
$navigation = build_navigation($this->navlinks, $cm);
print_header($pagetitle, $course->fullname, $navigation,
Index: mod/resource/type/text/resource.class.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/resource/type/text/resource.class.php,v
retrieving revision 1.37.2.1
diff -u -F ^f -r1.37.2.1 resource.class.php
--- mod/resource/type/text/resource.class.php 12 Oct 2007 16:09:47 -0000 1.37.2.1
+++ mod/resource/type/text/resource.class.php 10 Jul 2008 09:07:31 -0000
@@ -82,9 +82,10 @@ function display() {
"center", "", "", "20");
print_footer($course);
} else { /// Make a page and a pop-up window
- $navigation = build_navigation($this->navlinks, $cm);
+ $this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
+ $this->navigation = build_navigation($this->navlinks, $cm);
- print_header($pagetitle, $course->fullname, $navigation,
+ print_header($pagetitle, $course->fullname, $this->navigation,
"", "", true, update_module_button($cm->id, $course->id, $this->strresource),
navmenu($course, $cm));
@@ -111,9 +112,11 @@ function display() {
} else { /// not a popup at all
add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
- $navigation = build_navigation($this->navlinks, $cm);
- print_header($pagetitle, $course->fullname, $navigation,
+ $this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
+ $this->navigation = build_navigation($this->navlinks, $cm);
+
+ print_header($pagetitle, $course->fullname, $this->navigation,
"", "", true, update_module_button($cm->id, $course->id, $this->strresource),
navmenu($course, $cm));