Moodle
  1. Moodle
  2. MDL-44507

Filemanager download all indicator and repeated click supression

    Details

    • Testing Instructions:
      Hide

      Create a folder resource in a course.
      Add several files to the folder resource.
      Save and display it.
      Edit the folder resource.
      Click the "Download All" button.
      A waiting icon will appear next to the button indicating the download is getting ready.
      Additional clicks of "Download All" should not create additional AJAX download requests.
      When the file download begins the waiting icon will disappear.

      Show
      Create a folder resource in a course. Add several files to the folder resource. Save and display it. Edit the folder resource. Click the "Download All" button. A waiting icon will appear next to the button indicating the download is getting ready. Additional clicks of "Download All" should not create additional AJAX download requests. When the file download begins the waiting icon will disappear.
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-44507_master

      Description

      When there is a large amount files the filemanager can take a while to create the zip file when "download all" is clicked. Since it uses an AJAX request to get the file the user sees no indicator that anything is happening. If they click "download all" repeatedly the server performance can drop severely.

      The improvement is to display a loading icon next to the download all button when it is clicked and hide the icon once the download has started. While the loading icon is visible the download all button is essentially disabled.

        Gliffy Diagrams

          Activity

          Hide
          CiBoT added a comment -

          Results for MDL-44507

          • Error: the repository field is empty. Nothing was checked.
          Show
          CiBoT added a comment - Results for MDL-44507 Error: the repository field is empty. Nothing was checked.
          Hide
          CiBoT added a comment -
          Show
          CiBoT added a comment - Results for MDL-44507 Remote repository: https://github.com/SWiT/moodle.git Remote branch https://github.com/SWiT/moodle/tree/MDL-44507_master to be integrated into upstream master Executed job http://social.srv.in.moodle.com/job/Precheck%20remote%20branch/2441 Error: Unable to fetch information from https://github.com/SWiT/moodle/tree/MDL-44507_master branch at https://github.com/SWiT/moodle.git .
          Hide
          CiBoT added a comment -
          Show
          CiBoT added a comment - Results for MDL-44507 Remote repository: https://github.com/SWiT/moodle.git Remote branch MDL-44507 _master to be integrated into upstream master Executed job http://social.srv.in.moodle.com/job/Precheck%20remote%20branch/2457 Details: http://social.srv.in.moodle.com/job/Precheck%20remote%20branch/2457/artifact/work/smurf.html
          Hide
          CiBoT added a comment -
          Show
          CiBoT added a comment - Results for MDL-44507 Remote repository: https://github.com/SWiT/moodle.git Remote branch MDL-44507 _master to be integrated into upstream master Executed job http://social.srv.in.moodle.com/job/Precheck%20remote%20branch/2478 Details: http://social.srv.in.moodle.com/job/Precheck%20remote%20branch/2478/artifact/work/smurf.html
          Hide
          Dan Poltawski added a comment -

          Sending all 'waiting for peer review' issues for integration review. The integration team are doing this to ensure any 'integratable issues' will not got missed for freeze.

          Note: We will prioritise peer reviewed issues and may not spend as much time examining non-integratable, non peer-reviewed issues.

          This is a present from the iTeam - it means that peer review is not working well enough! We really do not want to do this again! Lets improve our peer review process!

          Show
          Dan Poltawski added a comment - Sending all 'waiting for peer review' issues for integration review. The integration team are doing this to ensure any 'integratable issues' will not got missed for freeze. Note: We will prioritise peer reviewed issues and may not spend as much time examining non-integratable, non peer-reviewed issues. This is a present from the iTeam - it means that peer review is not working well enough! We really do not want to do this again! Lets improve our peer review process!
          Hide
          Dan Poltawski added a comment -

          Hi Matthew,

          Thanks a lot for this patch, i've integrated it to master. I added one commit to fix the spacing on the if statement.

          FYI: If the JS file you were modifying was 'more modern' by Moodle standards I would've insisted on the variables being without underscores and perhaps chosen a different approach for tracking whether a download was in progress. But this seems like a good enough simple approach so i've integrated it as is.

          TO TESTER: you would almost certainly be better testing this on qa.moodle.net because it'll be too fast for you to see on your local machine.

          Show
          Dan Poltawski added a comment - Hi Matthew, Thanks a lot for this patch, i've integrated it to master. I added one commit to fix the spacing on the if statement. FYI: If the JS file you were modifying was 'more modern' by Moodle standards I would've insisted on the variables being without underscores and perhaps chosen a different approach for tracking whether a download was in progress. But this seems like a good enough simple approach so i've integrated it as is. TO TESTER: you would almost certainly be better testing this on qa.moodle.net because it'll be too fast for you to see on your local machine.
          Hide
          Adrian Greeve added a comment -

          Tested on the master integration branch.
          Clicking multiple times while the zip file is being prepared doesn't produce multiple save file dialogues.
          Test passed.

          Show
          Adrian Greeve added a comment - Tested on the master integration branch. Clicking multiple times while the zip file is being prepared doesn't produce multiple save file dialogues. Test passed.
          Hide
          Dan Poltawski added a comment -

          Thanks for your efforts, this change is now part of Moodle!

          Show
          Dan Poltawski added a comment - Thanks for your efforts, this change is now part of Moodle!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: