--- loncom/interface/multidownload.pl 2007/04/05 00:50:32 1.2
+++ loncom/interface/multidownload.pl 2007/04/05 16:18:22 1.3
@@ -2,7 +2,7 @@
# CGI-script to allow download of all essay submissions of
# multiple students.
#
-# $Id: multidownload.pl,v 1.2 2007/04/05 00:50:32 banghart Exp $
+# $Id: multidownload.pl,v 1.3 2007/04/05 16:18:22 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -90,10 +90,15 @@ foreach my $stu (@stuchecked) {
print $fh $file_content;
close $fh;
} else {
- print "problem creating file
";
+ print("problem creating file
");
}
}
}
}
-print 'Click to download';
+mkdir($doc_root."/zipout",0777);
+my $statement = "zip -r $doc_root/zipout/output.zip $doc_root/zipdir/* > /dev/null";
+system($statement);
+$statement = "rm -rf $doc_root/zipdir";
+system($statement);
+print('Click to download');
return 1;