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

Files: Zip packer progress minor bugs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6
    • 2.6
    • Files API
    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • MDL-41839-master
    • Hide

      Note: The actual change is tested via unit test. This test script just exercises zip and unzip.

      1. Using a suitable test course, such as the 'S' size test course, carry out a backup with default options.

      2. Restore the backup to a new course with default options.

      EXPECTED: Backup and restore complete succesfully without errors.

      Direct command for unit test for this feature:

      vendor/bin/phpunit lib/filestorage/tests/zip_packer_test.php

      Show
      Note: The actual change is tested via unit test. This test script just exercises zip and unzip. 1. Using a suitable test course, such as the 'S' size test course, carry out a backup with default options. 2. Restore the backup to a new course with default options. EXPECTED: Backup and restore complete succesfully without errors. Direct command for unit test for this feature: vendor/bin/phpunit lib/filestorage/tests/zip_packer_test.php

      I recently added code for the zip packer to report progress, but there were some accidental omissions: three recursive calls missed out the $progress variable.

      As a result it was possible that the progress callback did not get called between files when processing sub-folders.

      As well as the fixes, I'm also adding a new unit test that covers this case that didn't work correctly before.

      NOTE: There is still a long pause without progress calls in the zip archive 'close' method which is where it actually does most of the work, and because this ends up being a PHP built-in function we cannot do anything about it on a trivial level. I had some experimental work to improve this by closing it periodically but this is a bit inefficient; I think it's probably better to work on this issue with a new format as part of MDL-41838.

            quen Sam Marshall
            quen Sam Marshall
            Dan Poltawski Dan Poltawski
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jérôme Mouneyrac Jérôme Mouneyrac
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.