Skip to content
Permalink
Browse files

fix for MDL-9021, missing add_to_log() call

  • Loading branch information...
toyomoyo
toyomoyo committed Mar 30, 2007
1 parent 53b16b2 commit 65391c1aa390ab2629eab17bb415e80339d759c8
Showing with 4 additions and 2 deletions.
  1. +4 −2 mod/resource/type/html/resource.class.php
@@ -71,10 +71,13 @@ function display() {
$pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));
$inpopup = optional_param('inpopup', '', PARAM_BOOL);
// fix for MDL-9021, thanks Etienne Rozé
add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
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", "", "", "20");
@@ -107,7 +110,6 @@ function display() {
}
} else { /// not a popup at all
add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
print_header($pagetitle, $course->fullname, "$this->navigation ".format_string($resource->name),
"", "", true, update_module_button($cm->id, $course->id, $this->strresource),
navmenu($course, $cm));

0 comments on commit 65391c1

Please sign in to comment.
You can’t perform that action at this time.