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

Separate folder for each student's work in "Download all assignments as a zip"

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: DEV backlog
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide

      1. create a course with an "advanced upload" assignment
      2. have student test account(s) upload several files each
      3. as the teacher click on the "Download all assignments as a zip" & save the .ZIP somewhere
      4. check and see each student's files are correctly located in a subfolder within the .ZIP

      Show
      1. create a course with an "advanced upload" assignment 2. have student test account(s) upload several files each 3. as the teacher click on the "Download all assignments as a zip" & save the .ZIP somewhere 4. check and see each student's files are correctly located in a subfolder within the .ZIP
    • Workaround:
      Hide

      None, really

      (Maybe one could create a script to re-arrange the .ZIP once one has downloaded it? )

      Show
      None, really (Maybe one could create a script to re-arrange the .ZIP once one has downloaded it? )
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE

      Description

      Currently the mod/assignment provides a link to "Download all assignments as a zip", which is great except that all the students' work shows up in the same directory. Instead of using a modified filename to separate students' work it would be better (IMHO ) to put each student's work into a separate folder (named with the student's first & last name), and then keep the original file name (and extension) for each file.

      This can be accomplished by changing line 1118 in mod/assignment/type/upload/assignment.class.php

      $fileforzipname = clean_filename($a_user->lastname.' '. $a_user->firstname ) . "/" . clean_filename($fileoriginal . $fileext);

      (this is in the download_submissions() function, in the foreach ($files as $file) loop).

      I've put my changes on github at https://github.com/MikeTheGreat/moodle/tree/MDL-29343-SubfoldersForDownload (based on MOODLE_21_STABLE)

      NOTE: The above change will unconditionally download as "Lastname Firstname" / "OriginalFilename.ext" - I'm not sure how to allow the user to easily choose between "Lastname Firstname" and "Firstname Lastname"

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for suggesting that and providing a solution.

              Show
              salvetore Michael de Raadt added a comment - Thanks for suggesting that and providing a solution.
              Hide
              gaudreaj Jean-Philippe Gaudreau added a comment - - edited

              Thanks for diff in github! We implemented it in our Moodle and it works just fine! I agree with you, it's better to zip the assignments this way. It'll surely be easier for the teacher to find the assignments and it's not breaking filenames (renaming files that could break references).

              Here's a little improvement so you can keep the the subfolders in the assignments when using "Advanced uploading of files":
              https://github.com/StudiumDevel/moodle/commit/969b855bfde2c624832f1fab3ff5342450eb1d1d

              Applying modification also fix a bug.
              See : http://tracker.moodle.org/browse/MDL-30432

              Show
              gaudreaj Jean-Philippe Gaudreau added a comment - - edited Thanks for diff in github! We implemented it in our Moodle and it works just fine! I agree with you, it's better to zip the assignments this way. It'll surely be easier for the teacher to find the assignments and it's not breaking filenames (renaming files that could break references). Here's a little improvement so you can keep the the subfolders in the assignments when using "Advanced uploading of files": https://github.com/StudiumDevel/moodle/commit/969b855bfde2c624832f1fab3ff5342450eb1d1d Applying modification also fix a bug. See : http://tracker.moodle.org/browse/MDL-30432
              Hide
              damyon Damyon Wiese added a comment -

              Moved this to the new assignment module as it still applies.

              This could be an option, however it was a deliberate decision not to do this when we implemented this. The feeling was that dealing with files in folders is confusing when you have a lot of submissions to mark. (especially if the filenames look similar).

              Show
              damyon Damyon Wiese added a comment - Moved this to the new assignment module as it still applies. This could be an option, however it was a deliberate decision not to do this when we implemented this. The feeling was that dealing with files in folders is confusing when you have a lot of submissions to mark. (especially if the filenames look similar).
              Hide
              dimztimz Dimitrij Mijoski added a comment -

              There are two issues similar to this related to the filenames. Two of them are closed this is open, so I will comment here too.

              Would it be possible the student ID to be part of the name, of the folder in this case.

              Show
              dimztimz Dimitrij Mijoski added a comment - There are two issues similar to this related to the filenames. Two of them are closed this is open, so I will comment here too. Would it be possible the student ID to be part of the name, of the folder in this case.
              Hide
              reichertd Don Reichert added a comment -

              As a high school teacher I find this change to be VERY unfavorable. There should be at the very least an option to keep it the old way. I used to have assignments set up, so each student uploads a single file, then I download as a zip. It then renamed the files which was awesome. I could then either select all files and open them, or select all files and combine into a PDF. I now have to go into each folder individually open OR copy file AND/OR rename file, then back out, then go into next folder. Does not seem like a big deal, but when you have 30-35 students, 6 or 8 classes a day, at least 1 assignment per day, that works out to about 280 folder a day to go through. It there anyway to bring the old way back. If not I think you will see a lot of teachers unhappy. I am already looking into google classroom.

              Show
              reichertd Don Reichert added a comment - As a high school teacher I find this change to be VERY unfavorable. There should be at the very least an option to keep it the old way. I used to have assignments set up, so each student uploads a single file, then I download as a zip. It then renamed the files which was awesome. I could then either select all files and open them, or select all files and combine into a PDF. I now have to go into each folder individually open OR copy file AND/OR rename file, then back out, then go into next folder. Does not seem like a big deal, but when you have 30-35 students, 6 or 8 classes a day, at least 1 assignment per day, that works out to about 280 folder a day to go through. It there anyway to bring the old way back. If not I think you will see a lot of teachers unhappy. I am already looking into google classroom.
              Hide
              heintz Jim Heintz added a comment - - edited

              I am also a high school teacher with the SAME comment as Don - it is a lot more work to grade and display student work this way. At least make it an option to keep the old way so that all of the files were names as the they were in 3.0. I have spent several hours looking for some way to make the switch back. I would not have upgraded my Moodle server if I had realized that I was going to have to do so much more work. I too, need to find a different solution and I have been using Moodle since it started (before 1.0) - usually I love the updates, but this is a deal breaker.

              Can I just switch the assignments folder in Mod to the old one, or is it somewhere else?

              Show
              heintz Jim Heintz added a comment - - edited I am also a high school teacher with the SAME comment as Don - it is a lot more work to grade and display student work this way. At least make it an option to keep the old way so that all of the files were names as the they were in 3.0. I have spent several hours looking for some way to make the switch back. I would not have upgraded my Moodle server if I had realized that I was going to have to do so much more work. I too, need to find a different solution and I have been using Moodle since it started (before 1.0) - usually I love the updates, but this is a deal breaker. Can I just switch the assignments folder in Mod to the old one, or is it somewhere else?
              Hide
              sbourget Stephen Bourget added a comment -

              Don Reichert and Jim Heintz You may want to take a look at MDL-56022 where we are discussing the impact of this change. Feedback on that issue would be appreciated.

              Show
              sbourget Stephen Bourget added a comment - Don Reichert and Jim Heintz You may want to take a look at MDL-56022 where we are discussing the impact of this change. Feedback on that issue would be appreciated.

                People

                • Votes:
                  16 Vote for this issue
                  Watchers:
                  17 Start watching this issue

                  Dates

                  • Created:
                    Updated: