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

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

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.1, 2.2
    • Assignment
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • 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? )
    • 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

      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"

            Votes:
            16 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved:

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