Currently mod/resource/type/html/resource.class.php display() does not log resource page views if blocks are showing:-
/// Are we displaying the course blocks?
if ($this->resource->options == 'showblocks')
else {
/// Set up generic stuff first, including checking for access
parent::display();
/// Set up some shorthand variables
$cm = $this->cm;
$course = $this->course;
$resource = $this->resource;
$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); // OK here
Easily resolved, but is there any reason not to make this correction?
- is a clone of
-
MDL-9021 View of html resource not adds in log in certain conditions
- Closed