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

Filemanager download button problems

    Details

    • Testing Instructions:
      Hide

      Test pre-requisites

      • A few level of folders and files in your private files
      • Some empty directories in there

      Test steps

      1. Go to your private files
      2. Make sure you can "Download all" at any level
      3. Make sure the content of the "Download all" zip file is accurate (and does not start with a folder named 0)
      4. Make sure you stay in the same directory
      5. Make sure you CANNOT "Download all" when the directory is empty
      1. Go to your private files
      2. Click on any folder to zip it
      3. Make sure the content of the zip is correct
      4. Make sure you can zip a folder at any level
      5. Make sure the zip created does not overwrite any existing file (if the file already exist, _2 will be appended to the zip file name)

      Repeat with JavaScript turned off

      Master only test

      1. Make sure you can "Download all" when there are NO files (but folders) throughout the whole area
      Show
      Test pre-requisites A few level of folders and files in your private files Some empty directories in there Test steps Go to your private files Make sure you can "Download all" at any level Make sure the content of the "Download all" zip file is accurate (and does not start with a folder named 0) Make sure you stay in the same directory Make sure you CANNOT "Download all" when the directory is empty Go to your private files Click on any folder to zip it Make sure the content of the zip is correct Make sure you can zip a folder at any level Make sure the zip created does not overwrite any existing file (if the file already exist, _2 will be appended to the zip file name) Repeat with JavaScript turned off Master only test Make sure you can "Download all" when there are NO files (but folders) throughout the whole area
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-32639-master

      Description

      There are several problems with 'Download dir' button in filemanager form element that I found:

      1) If there are files in filemanager but there are no files in the current folder, the button is still displayed.
      This happens because the obj.filescount contains total count of files and not count of files in the current subfolder. Since this variable is also used in dndupload, we need to introduce another counter

      2) After downloading folder on the second level, filemanager jumps to the root level. When trying to download folder on the third level, error is thrown.
      There is probably error in repository/draffiles_ajax.php

      3) In the downloaded zip archive the empty folders are skipped and the extra root folder with name "0" is created
      The same happens if I select 'Zip' in folder context menu in filemanager

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  2 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/Jan/13