Diff for /loncom/homework/essayresponse.pm between versions 1.82 and 1.87

version 1.82, 2007/04/17 23:25:09 version 1.87, 2008/02/01 22:05:45
Line 148  sub end_essayresponse { Line 148  sub end_essayresponse {
     my ($symb,$crsid,$domain,$name)=      my ($symb,$crsid,$domain,$name)=
  &Apache::lonnet::whichuser();   &Apache::lonnet::whichuser();
     if ($crsid) {      if ($crsid) {
  my $akey=$name.'.'.$domain.'.'.$crsid;   my $akey=join('.',&escape($name),&escape($domain),
         &escape($crsid));
  my $essayurl=   my $essayurl=
     &Apache::lonnet::declutter($ENV{'REQUEST_URI'});      &Apache::lonnet::declutter($ENV{'REQUEST_URI'});
  my ($adom,$aname,$apath)=   my ($adom,$aname,$apath)=
Line 183  sub end_essayresponse { Line 184  sub end_essayresponse {
   
     if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||      if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||
  $target eq 'tex' || $target eq 'analyze') {   $target eq 'tex' || $target eq 'analyze') {
  &Apache::lonxml::increment_counter($increment);   &Apache::lonxml::increment_counter($increment, "$part.$id");
   
    if ($target eq 'analyze') {
               $Apache::lonhomework::analyze{"$part.$id.type"} = 'essayresponse';
       &Apache::lonhomework::set_bubble_lines();
    }
     }      }
     &Apache::response::end_response;      &Apache::response::end_response;
   
Line 245  sub file_submission { Line 251  sub file_submission {
     $uploadedfiletypes=','.$uploadedfiletypes.',';      $uploadedfiletypes=','.$uploadedfiletypes.',';
     foreach my $file (@submitted_files) {      foreach my $file (@submitted_files) {
  my ($extension)=($file=~/\.(\w+)$/);   my ($extension)=($file=~/\.(\w+)$/);
  unless ($uploadedfiletypes=~/\,$extension\,/i) {   unless ($uploadedfiletypes=~/\,\s*\Q$extension\E\s*\,/i) {
     $$award='INVALID_FILETYPE';      $$award='INVALID_FILETYPE';
  }   }
     }      }

Removed from v.1.82  
changed lines
  Added in v.1.87


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