[LON-CAPA-cvs] cvs: loncom /interface multidownload.pl

banghart lon-capa-cvs-allow@mail.lon-capa.org
Mon, 30 Apr 2007 17:38:10 -0000


banghart		Mon Apr 30 13:38:10 2007 EDT

  Modified files:              
    /loncom/interface	multidownload.pl 
  Log:
  	Remove call to grades.pm.
  
  
Index: loncom/interface/multidownload.pl
diff -u loncom/interface/multidownload.pl:1.19 loncom/interface/multidownload.pl:1.20
--- loncom/interface/multidownload.pl:1.19	Fri Apr 27 18:43:11 2007
+++ loncom/interface/multidownload.pl	Mon Apr 30 13:38:09 2007
@@ -2,7 +2,7 @@
 # CGI-script to allow download of all essay submissions of 
 # multiple students.
 #
-# $Id: multidownload.pl,v 1.19 2007/04/27 22:43:11 banghart Exp $
+# $Id: multidownload.pl,v 1.20 2007/04/30 17:38:09 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -73,9 +73,6 @@
     my $navmap = Apache::lonnavmaps::navmap->new();
     my $res = $navmap->getBySymb($symb);
     my $partlist = $res->parts();
-    foreach my $part(@$partlist) {
-        &Apache::lonnet::logthis("partlist is $part");
-    }
     my ($zipout) = ($symb =~ /^.*\/(.+)\.problem$/);
     $zipout =~ s/\s/_/g;
     $zipout .= ".zip";
@@ -92,12 +89,13 @@
         my %files_saved;
         my ($stuname,$studom,$fullname) = split(/:/,$stu);
         my %record = &Apache::lonnet::restore($symb,$courseid,$studom,$stuname);
+        my $file_url = '/uploaded/'.$studom.'/'.$stuname.'/portfolio';
         foreach my $partid (@$partlist) {
             my @ids = $res->responseIds($partid);
             foreach my $respid(@ids) {
                 &mkpath($doc_zip_root."/zipdir/$unique_user/$unique_path/$stuname/part$partid/resp$respid",0,0700);
-                my $files = &Apache::grades::get_submitted_files($studom,$stuname,$partid,$respid,\%record);
-                foreach my $file (@$files) {
+                foreach my $file (split(',',$record{"resource.$partid.$respid.portfiles"})) {
+                    $file = $file_url.$file;
                     my ($file_name_only) = ($file =~ /^.*\/(.+$)/);
                     &Apache::lonnet::repcopy($file);
                     my $source = &Apache::lonnet::filelocation("",$file);