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

mod/folder/download_folder.php zip download does not include content of external files

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.11.6
    • None
    • Files API
    • None
    • MOODLE_311_STABLE

    Description

      MDL-68481 has introduced a regression. The generated ZIP file no longer includes the content of any external files. (Files of type FILE_REFERENCE). Any such files are included in the ZIP file, they have the correct filenames. But they have no content, they are all zero length.
       

      This can be recreated using the "File system" repository:

      • Go to manage repositories and set the "File system" repository to "Enabled and visible".
      • Go to the settings for the "File System" repository and create a new repository instance.
      • Follow the instructions for creating a new folder directly on the file system of Moodle server. And populate the folder with some simple text files.
      • Refresh the page in the browser for creating a new repository instance to pick up newly created folder on the server.
      • Provide a name, select the folder and save the configuration for the repository.
      • Create a new course.
      • Within that course add a "Folder" resource.
      • When adding the Folder populate the files with files from the file system repository:
        • In the file picker navigate to the file system repository.
        • Select a simple text file from the file system repository.
        • When selecting the file use "Link to the file". (Do not use "Make a copy of a file".)
      • Save and display the Folder.
      • Use the "Download folder" action to generate a ZIP file of all the files in the Folder resource. That will prompt your browser to save a ZIP file on your computer.
      • Extract the contents of the ZIP and double check that the files match those created on the file system on the Moodle server. Expect that the content of the files extracted matches the content of the files on the file system.

      Attachments

        Activity

          People

            Unassigned Unassigned
            michaeldunstan Michael Dunstan
            Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: