Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-28442

New event when a file was viewed by user (for optional logging)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Deferred
    • Affects Version/s: 1.9.12, 2.1
    • Fix Version/s: BACKEND
    • Component/s: Files API
    • Labels:
    • Workaround:
      Hide

      add a add_to_log function to /file.php manually (around the end of the file)

      Show
      add a add_to_log function to /file.php manually (around the end of the file)
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_21_STABLE

      Description

      Recently, i tried to get a log report of students viewing some files (they were not supposed to) and i found out that there is no logging of such activity. (In Moodle 1.9.x and Moodle 2.x)

      I suggest adding a log entry function to /file.php for both Moodle versions

      maybe:
      add_to_log($course->id, 'file', 'view', "/file.php/$course->id/$file", "$course->id");
      (not sure if the above syntax is good for both Moodle 1.9 and 2.x)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: