Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-4162

Turnitintool logs are not displayed in log viewer.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.3.4
    • Module: Turnitintool
    • None
    • MOODLE_23_STABLE

      To Reproduce:

      1. Access class with Turnitintool activity that has been accessed
      2. Access the logs
      3. Select the TII activity and get the logs
      4. No records should be displayed
      5. Select "All Activities" and get the logs
      6. 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.

            paul.dawson Paul Dawson (Inactive)
            mhughes2k Michael Hughes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.