Diff for /loncom/interface/multidownload.pl between versions 1.22 and 1.23

version 1.22, 2007/04/30 18:22:39 version 1.23, 2007/04/30 22:47:28
Line 74  if (&Apache::lonnet::allowed('vgr',$scop Line 74  if (&Apache::lonnet::allowed('vgr',$scop
     my $partlist = $res->parts();      my $partlist = $res->parts();
     my ($zipout) = ($symb =~ /^.*\/(.+)\.problem$/);      my ($zipout) = ($symb =~ /^.*\/(.+)\.problem$/);
     $zipout =~ s/\s/_/g;      $zipout =~ s/\s/_/g;
     $zipout .= ".zip";      $zipout .= "$identifier.zip";
     my $courseid = $env{'request.course.id'};      my $courseid = $env{'request.course.id'};
     my @stuchecked = split(/\n/,$env{'cgi.'.$identifier.'.students'});      my @stuchecked = split(/\n/,$env{'cgi.'.$identifier.'.students'});
     my @parts = split(/\n/,$env{'cgi.'.$identifier.'.parts'});      my @parts = split(/\n/,$env{'cgi.'.$identifier.'.parts'});
Line 125  if (&Apache::lonnet::allowed('vgr',$scop Line 125  if (&Apache::lonnet::allowed('vgr',$scop
     }      }
           
     &mkpath($doc_zip_root."/zipout/$unique_user",0,0700);      &mkpath($doc_zip_root."/zipout/$unique_user",0,0700);
     my $statement = "cd $doc_zip_root/zipdir/$unique_user/$unique_path\n";      my $statement;
     $statement .= "zip -r $doc_zip_root/zipout/$unique_user/$zipout * > /dev/null";      if (! -e "$doc_zip_root/zipout/$unique_user/$zipout") {
     system($statement);          $statement = "cd $doc_zip_root/zipdir/$unique_user/$unique_path\n";
           $statement .= "zip -r $doc_zip_root/zipout/$unique_user/$zipout * > /dev/null";
           system($statement);
       } else {
           # should happen only if user reloads page 
           &Apache::lonnet::logthis("$zipout is already there");
       }
     $statement = "rm -rf $doc_zip_root/zipdir/$unique_user/$unique_path";      $statement = "rm -rf $doc_zip_root/zipdir/$unique_user/$unique_path";
     system($statement);      system($statement);
     print('<a href="/zipspool/zipout/'.$unique_user.'/'.$zipout.'">'.      print('<a href="/zipspool/zipout/'.$unique_user.'/'.$zipout.'">'.

Removed from v.1.22  
changed lines
  Added in v.1.23


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>