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

Accessing file resources without frame fails to create log entry

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.8, 1.9.9, 1.9.13
    • 1.9.15
    • Resource
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • 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.

    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

            blepoxp Glenn Ansley
            colin Colin Campbell
            Andrew Davis Andrew Davis
            Sam Hemelryk Sam Hemelryk
            Rossiani Wijaya Rossiani Wijaya
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              28/Nov/11