Resource "view" report logs not consistent

Resource "view" report logs not consistent

by Dennis Perkins -
Number of replies: 3
New user here (Moodle version 1.9.8+ (Build: 20100407)):

I note that the report logs for a specific resource will not report "views" unless the resource is loaded in a separate window.

If I create a resource to view an HTML file in the same window, for example, the reports won't show views for this resource unless I change it to load in a separate window.

Is this a known issue, and, if so, is there a workaround?

Thanks,
Dennis Perkins

Average of ratings: -
In reply to Dennis Perkins

Re: Resource "view" report logs not consistent

by J B -

This has been the case for soome time as far as I am aware - I don't know if it is a design feature, but I, too, fail to see the logic and have changed it as follows:

At about line 435 of /mod/resource/type/file/resource.class.php, you will find the lines:

        /// We can only get here once per resource, so add an entry to the log

add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);

Copy, then delete (or comment out) the add_to_log call, and paste it back in to the file at about line 317, just above:

        /// Check whether this is supposed to be a popup, but was called directly
In reply to J B

Re: Resource "view" report logs not consistent

by Rich Schumaker -

I tried this workaround in 1.9.7 and it doesn't seem to correct the problem.  Has anyone else had any luck?

In reply to Rich Schumaker

Re: Resource "view" report logs not consistent

by Rich Schumaker -

Take that back after I logged out and came back in it worked just fine - Thank you so much!