Moodle
  1. Moodle
  2. MDL-39359

Allow zipped folder to be uploaded for returning feedback files

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.9, 2.3.6, 2.4.3
    • Fix Version/s: 2.6
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide

      1. Log in as a teacher and create a new assignment with file submissions and feedback files both set to yes.
      2. Log in as a student and submit a file.
      3. Log in as another student and submit another file.
      4. Log in as the teacher again and follow the 'View/grade all submissions' link.
      5. From the "Grading action" dropdown at the top of the page, choose "Download all submissions" and save the zip file.
      6. Extract the zip file (into a folder) and modify each file.
      7. Zip the entire folder and upload using the "Upload multiple feedback files in a zip" grading action.
      8. Confirm that feedback files were correctly allocated to submissions.

      Regression test:
      9. Repeat steps 1-6.
      10. Zip just the files (not the folder) and upload using the "Upload multiple feedback files in a zip" grading action.
      11. Confirm that feedback files were correctly allocated to submissions.

      Show
      1. Log in as a teacher and create a new assignment with file submissions and feedback files both set to yes. 2. Log in as a student and submit a file. 3. Log in as another student and submit another file. 4. Log in as the teacher again and follow the 'View/grade all submissions' link. 5. From the "Grading action" dropdown at the top of the page, choose "Download all submissions" and save the zip file. 6. Extract the zip file (into a folder) and modify each file. 7. Zip the entire folder and upload using the "Upload multiple feedback files in a zip" grading action. 8. Confirm that feedback files were correctly allocated to submissions. Regression test: 9. Repeat steps 1-6. 10. Zip just the files (not the folder) and upload using the "Upload multiple feedback files in a zip" grading action. 11. Confirm that feedback files were correctly allocated to submissions.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-39359_master

      Description

      The "Upload multiple feedback files in a zip" feature is convenient, but requires that the files sit directly within the zip file. As the files will most likely be extracted to a folder after downloading, it's quite reasonable to expect teachers to zip the folder up rather than selecting all files and zipping them. At present, this results in the import process seeing no files, as the folder is skipped due to its folderness.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Damyon Wiese added a comment -

            Thanks Paul,

            Looks like you are working on this since you assigned it to yourself. The suggestion sounds good to me.

            Show
            Damyon Wiese added a comment - Thanks Paul, Looks like you are working on this since you assigned it to yourself. The suggestion sounds good to me.
            Hide
            Mary Cooch added a comment -

            I noticed that a while back and agree it would be very useful.

            Show
            Mary Cooch added a comment - I noticed that a while back and agree it would be very useful.
            Hide
            Paul Nicholls added a comment -

            Hi Damyon,
            Yes, I'm working on it - in fact, I'm just tidying it up and preparing branches to push up to Github. Thanks for reassigning this to the correct Assignment component (perhaps the two could be renamed to make it clearer at a glance which one's which? It's hard to remember which version the new one was released in, and therefore whether "2.2" means >=2.2 or <=2.2!).

            -Paul

            Show
            Paul Nicholls added a comment - Hi Damyon, Yes, I'm working on it - in fact, I'm just tidying it up and preparing branches to push up to Github. Thanks for reassigning this to the correct Assignment component (perhaps the two could be renamed to make it clearer at a glance which one's which? It's hard to remember which version the new one was released in, and therefore whether "2.2" means >=2.2 or <=2.2!). -Paul
            Hide
            Jason Fowler added a comment -

            Hi Paul, the code makes sense. If you have a moment, could you please align the subsequent lines for the get_directory_files() function call so they start inline with the first param? Other wise, it is good to go.

            Show
            Jason Fowler added a comment - Hi Paul, the code makes sense. If you have a moment, could you please align the subsequent lines for the get_directory_files() function call so they start inline with the first param? Other wise, it is good to go.
            Hide
            Paul Nicholls added a comment -

            Hi Jason,
            I've rebased on current master and indented the subsequent lines in the get_directory_files() call another notch to align with the first param.

            -Paul

            Show
            Paul Nicholls added a comment - Hi Jason, I've rebased on current master and indented the subsequent lines in the get_directory_files() call another notch to align with the first param. -Paul
            Hide
            Dan Poltawski added a comment -

            Integrated to master - thanks Paul!

            (btw I think this is a good candidate for a backport request http://docs.moodle.org/dev/Integration_Review#Process_for_requesting_a_non_bug-fix_backport )

            Show
            Dan Poltawski added a comment - Integrated to master - thanks Paul! (btw I think this is a good candidate for a backport request http://docs.moodle.org/dev/Integration_Review#Process_for_requesting_a_non_bug-fix_backport )
            Hide
            Ankit Agarwal added a comment -

            Works as described.
            Thanks

            Show
            Ankit Agarwal added a comment - Works as described. Thanks
            Hide
            Sam Hemelryk added a comment -

            Against all probability we've achieved normality. You changes didn't break the tests I pretended to run and are now immortalised upstream. Good for you!

            "It was a programming technique that had been reverse-engineered from the sort of psychotic mental blocks that otherwise perfectly normal people had been observed invariably to develop when elected to high political office."
            Adams, D (1992) Mostly Harmless. London: William Heinemann.

            Show
            Sam Hemelryk added a comment - Against all probability we've achieved normality. You changes didn't break the tests I pretended to run and are now immortalised upstream. Good for you! "It was a programming technique that had been reverse-engineered from the sort of psychotic mental blocks that otherwise perfectly normal people had been observed invariably to develop when elected to high political office." Adams, D (1992) Mostly Harmless. London: William Heinemann.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: