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

mod/resource does not log downloads when using forcedownload

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.2.2, 2.3
    • None
    • Resource
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MDL-31247-master-1
    • Hide

      Using an embeddable media type

      • create a new file resource and upload a PDF
      • set the 'Display' setting to 'Automatic' and save changes
      • click the link for the resource
        • the PDF should embed
      • update the resource and set the Display to 'Embed' and save changes
      • click the link for the resource
        • the PDF should embed
      • update the resource and set the Display to 'Force Download' and save changes
      • click the link for the resource
        • a new window may (or may not) be opened and the file will be downloaded. The browser window should close after accepting the download
      • update the resource and set the Display to 'Open' and save changes
      • click the link for the resource
        • the PDF should open (or download if the browser doesn't support opening in the browser window)
      • update the resource and set the Display to 'In pop-up' and save changes
      • click the link for the resource
        • the PDF should open in a popup window

      Using an non-embeddable media type

      • create a new file resource and upload a zip file
      • set the 'Display' setting to 'Automatic' and save changes
      • click the link for the resource
        • a new window may (or may not) be opened and the file will be downloaded. The browser window should close after accepting the download
      • update the resource and set the Display to 'Embed' and save changes
      • click the link for the resource
        • the file information will be displayed with a download link
        • the download link should download the file
      • update the resource and set the Display to 'Force Download' and save changes
      • click the link for the resource
        • a new window may (or may not) be opened and the file will be downloaded. The browser window should close after accepting the download
      • update the resource and set the Display to 'Open' and save changes
      • click the link for the resource
        • the file should be downloaded
      • update the resource and set the Display to 'In pop-up' and save changes
      • click the link for the resource
        • A popup window will be opened, the file should download, the popup doesn't close (this sucks, but is the existing behaviour)

      Make sure this is tested in all supported browsers

      Show
      Using an embeddable media type create a new file resource and upload a PDF set the 'Display' setting to 'Automatic' and save changes click the link for the resource the PDF should embed update the resource and set the Display to 'Embed' and save changes click the link for the resource the PDF should embed update the resource and set the Display to 'Force Download' and save changes click the link for the resource a new window may (or may not) be opened and the file will be downloaded. The browser window should close after accepting the download update the resource and set the Display to 'Open' and save changes click the link for the resource the PDF should open (or download if the browser doesn't support opening in the browser window) update the resource and set the Display to 'In pop-up' and save changes click the link for the resource the PDF should open in a popup window Using an non-embeddable media type create a new file resource and upload a zip file set the 'Display' setting to 'Automatic' and save changes click the link for the resource a new window may (or may not) be opened and the file will be downloaded. The browser window should close after accepting the download update the resource and set the Display to 'Embed' and save changes click the link for the resource the file information will be displayed with a download link the download link should download the file update the resource and set the Display to 'Force Download' and save changes click the link for the resource a new window may (or may not) be opened and the file will be downloaded. The browser window should close after accepting the download update the resource and set the Display to 'Open' and save changes click the link for the resource the file should be downloaded update the resource and set the Display to 'In pop-up' and save changes click the link for the resource A popup window will be opened, the file should download, the popup doesn't close (this sucks, but is the existing behaviour) Make sure this is tested in all supported browsers

    Description

      One of our users has reported that their logs are incomplete for viewing of a course resource.

      The resource in question is a PDF set to force download.

      Looking at the source for the page, I see that the resource is opened with a JS window.open() call directly on the pluginfile.php rather than on the mod/resource/view.php

      Attachments

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              dobedobedoh Andrew Lyons
              Sam Hemelryk Sam Hemelryk
              Aparup Banerjee Aparup Banerjee
              Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: