From 65391c1aa390ab2629eab17bb415e80339d759c8 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Fri, 30 Mar 2007 08:00:42 +0000 Subject: [PATCH] fix for MDL-9021, missing add_to_log() call --- mod/resource/type/html/resource.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/resource/type/html/resource.class.php b/mod/resource/type/html/resource.class.php index e297ddf442..08d10f2176 100644 --- a/mod/resource/type/html/resource.class.php +++ b/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)); -- 2.39.5