Diff for /loncom/interface/multidownload.pl between versions 1.9 and 1.10

version 1.9, 2007/04/26 18:30:38 version 1.10, 2007/04/26 19:13:26
Line 70  if ($env{'request.course.sec'}) { Line 70  if ($env{'request.course.sec'}) {
 }  }
 if (&Apache::lonnet::allowed('vgr',$scope) eq 'F') {  if (&Apache::lonnet::allowed('vgr',$scope) eq 'F') {
     my $symb = $env{'cgi.'.$identifier.'.symb'};      my $symb = $env{'cgi.'.$identifier.'.symb'};
       $symb =~ /^.*\/(.+)\.problem$/;
       my $zipout = $1.".zip";
       $zipout =~ s/\s/_/g;
     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 106  if (&Apache::lonnet::allowed('vgr',$scop Line 109  if (&Apache::lonnet::allowed('vgr',$scop
     }      }
     mkdir($doc_zip_root."/zipout/$uname$udom",0700);      mkdir($doc_zip_root."/zipout/$uname$udom",0700);
     my $statement = "cd $doc_zip_root/zipdir/$uname$udom/$unique_path\n";      my $statement = "cd $doc_zip_root/zipdir/$uname$udom/$unique_path\n";
     $statement .= "zip -r $doc_zip_root/zipout/$uname$udom/output.zip * > /dev/null";      $statement .= "zip -r $doc_zip_root/zipout/$uname$udom/$zipout * > /dev/null";
     system($statement);      system($statement);
     $statement = "rm -rf $doc_zip_root/zipdir/$uname$udom/$unique_path";      $statement = "rm -rf $doc_zip_root/zipdir/$uname$udom/$unique_path";
     system($statement);      system($statement);
     print('<a href="/zipspool/zipout/'.$uname.$udom.'/output.zip">Click to download</a><br />');      print('<a href="/zipspool/zipout/'.$uname.$udom.'/'.$zipout.'">Click to download</a><br />');
 } else {  } else {
     print('You are not authorized to download student submissions.');      print('You are not authorized to download student submissions.');
 }  }

Removed from v.1.9  
changed lines
  Added in v.1.10


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