Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 1.9
-
Fix Version/s: 2.0
-
Component/s: Assignment
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
Currently each student's assignment is stored in a separate directory under the the user's userid. This means that one cannot simply go directly into the moodledata file and retrieve all assignments in a simple manner. It is generally cumbersome to have to click and download each assignment before viewing them – particularly for large classes.
What I would like to suggest is a "Collect" button on the assignment page, which would iterate through all submitted assignments of a particular assignment instance, gather the most recent version of each and present the entire set to the teacher as a single ZIP file. This could then be downloaded, and all of the files opened at once for viewing, comparison or comments.
Hello,
Here is my quick & dirty solution that I am using since Moodle 1.7
1) copy the attached file "devoir2zip.php" in mod/assignment
2) modify mod/assignment /lib.php function near line 1201 to add the lines with '+' below
[root@cipcnet moodle]# diff -U3 cvs/mod/assignment/lib.php mod/assignment/
— cvs/mod/assignment/lib.php 2008-01-10 02:45:11.000000000 +0100
+++ mod/assignment/lib.php 2008-04-11 10:00:44.000000000 +0200
@@ -1201,6 +1201,12 @@
}
}
+//PP link to downlad a zip with all submissions
+$button= link_to_popup_window ('/mod/assignment/devoir2zip.php?id='.
+ $this->cm->id.'&group='.$currentgroup,
+ '','télécharger un zip des devoirs ',400,500,'','none',true);
+echo '<p align="center">'.$button.'(n\'oubliez pas de choisir d\'abord le groupe si nécessaire!)</p>';
+
/// Print quickgrade form around the table
if ($quickgrade){
echo '<form action="submissions.php" name="fastg" method="post">';
3) VERY important : modify lib/pclzip/pclzip.php define for temporary dir
// define( 'PCLZIP_TEMPORARY_DIR', '' );
define ('PCLZIP_TEMPORARY_DIR',"$CFG->dataroot/temp/");
and finally : translate to your language the hard-coded strings
)
Hope this help and may find its way in official release after code polishing and translation support
Cheers.