Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.11.6, 4.0.8
-
None
-
MOODLE_311_STABLE, MOODLE_400_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.