-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
2.3.4
-
None
-
MOODLE_23_STABLE
To Reproduce:
- Access class with Turnitintool activity that has been accessed
- Access the logs
- Select the TII activity and get the logs
- No records should be displayed
- Select "All Activities" and get the logs
- The TII activity's log entries are displayed
It appears that the turnitin direct plugin we are currently using (v2012092401) is calling the add_to_log() function like:
add_to_log($course->id, "turnitintool", "view", "view.php?id=$cm->id", "$turnitintool->id");
|
every other moodle plugin appears (or should be when viewing an activity) calls it like:
add_to_log($course->id, 'resource', 'view', 'view.php?id='.$cm->id, $resource->id, $cm->id);
|
The difference is the specification of the 6th parameter which is called "cm". This specifies the coursemodule id that was being viewed, but it defaults to 0.
The build_logs_array() function in course/lib.php which retrieves the log entries has the following code (L260):
if ('site_errors' === $modid) {
|
$joins[] = "( l.action='error' OR l.action='infected' )";
|
} else if ($modid) {
|
$joins[] = "l.cmid = :modid";
|
$params['modid'] = $modid;
|
}
|
which is using the parameter modid (provided by the log report's selector options) to filter the log's table based on the column cmid, which will be 0 for TII activities because the Turnitin Direct plugin isn't bothering to record this data.