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

Accessing file resources without frame fails to create log entry

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.8, 1.9.9, 1.9.13
    • Fix Version/s: 1.9.15
    • Component/s: Resource
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a file resource that links to an uploaded HTML file
      2. Name it 'Yes, without frame'
      3. Click 'Advanced' under 'Window' section
      4. Change 'Show Navigation' to 'Yes, without frame'
      5. Save and view resource a couple of times
      6. View logs and note that no log entry has been created
      7. Apply patch, repeat steps 1-5, view log and find entry.

      Show
      1. Create a file resource that links to an uploaded HTML file 2. Name it 'Yes, without frame' 3. Click 'Advanced' under 'Window' section 4. Change 'Show Navigation' to 'Yes, without frame' 5. Save and view resource a couple of times 6. View logs and note that no log entry has been created 7. Apply patch, repeat steps 1-5, view log and find entry.
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Pull from Repository:

      Description

      To reproduce, create a file resource (a pdf, for example) and set "Show navigation" to "Yes, without frame". Then access the resource. Look at the log and see that no record of the access appears.

      We fixed the problem locally by adding another call to add_to_log in the display function in mod/resource/type/file/resource.class.php. We added it immediately after this objectframe condition

      if ($resource->options == "objectframe") {

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

        Attachments

          Activity

            People

            Assignee:
            blepoxp Glenn Ansley
            Reporter:
            colin Colin Campbell
            Peer reviewer:
            Andrew Davis
            Integrator:
            Sam Hemelryk
            Tester:
            Rossiani Wijaya
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              28/Nov/11