Diff for /loncom/homework/response.pm between versions 1.90 and 1.92

version 1.90, 2004/02/09 19:38:00 version 1.92, 2004/02/27 17:18:32
Line 45  sub start_response { Line 45  sub start_response {
     push (@Apache::inputtags::response,$id);      push (@Apache::inputtags::response,$id);
     push (@Apache::inputtags::responselist,$id);      push (@Apache::inputtags::responselist,$id);
     @Apache::inputtags::inputlist=();      @Apache::inputtags::inputlist=();
       if ($Apache::inputtags::part eq '') {
    &Apache::lonxml::error(&HTML::Entities::encode(&mt("Found a <*response> outside of a <part> in a <part>ed problem")));
       }
       if ($Apache::inputtags::response_with_no_part &&
    $Apache::inputtags::part ne '0') {
    &Apache::lonxml::error(&HTML::Entities::encode(&mt("<*response>s are both inside of <part> and outside of <part>, this is not a valid problem, errors in grading may occur.")).'<br />');
       }
       if ($Apache::inputtags::part eq '0') {
    $Apache::inputtags::response_with_no_part=1;
       }
     return $id;      return $id;
 }  }
   
Line 502  sub scored_response { Line 512  sub scored_response {
  if ($increase ne '') { $score+=$increase+1; }   if ($increase ne '') { $score+=$increase+1; }
     }      }
     my $weight = &Apache::lonnet::EXT("resource.$part.weight");      my $weight = &Apache::lonnet::EXT("resource.$part.weight");
       if (!defined($weight) || $weight eq '' || $weight eq 0) { $weight = 1; }
     my $pcr=$score/$weight;      my $pcr=$score/$weight;
     $Apache::lonhomework::results{"resource.$part.$id.awarded"}=$pcr;      $Apache::lonhomework::results{"resource.$part.$id.awarded"}=$pcr;
     $Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=      $Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=

Removed from v.1.90  
changed lines
  Added in v.1.92


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