Diff for /loncom/homework/inputtags.pm between versions 1.117 and 1.121

version 1.117, 2003/09/22 20:49:01 version 1.121, 2003/10/13 21:09:47
Line 112  sub start_textfield { Line 112  sub start_textfield {
  if ( $cols eq '') { $cols = 80; }   if ( $cols eq '') { $cols = 80; }
  my $rows = &Apache::lonxml::get_param('rows',$parstack,$safeeval);   my $rows = &Apache::lonxml::get_param('rows',$parstack,$safeeval);
  if ( $rows eq '') { $rows = 10; }   if ( $rows eq '') { $rows = 10; }
  $result= '<textarea name="HWVAL_'.$resid.'" '.   $result= '<textarea wrap="hard" name="HWVAL_'.$resid.'" '.
     "rows=\"$rows\" cols=\"$cols\">".$oldresponse;      "rows=\"$rows\" cols=\"$cols\">".$oldresponse;
  if ($oldresponse ne '') {   if ($oldresponse ne '') {
     #get rid of any startup text if the user has already responded      #get rid of any startup text if the user has already responded
Line 414  sub decideoutput { Line 414  sub decideoutput {
       $bgcolor=$possiblecolors{'not_charged_try'};        $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;        $button=1;
   } elsif ($award eq 'SIG_FAIL') {    } elsif ($award eq 'SIG_FAIL') {
       $message = &mt("Please adjust significant figures.");# you provided %s significant figures";        $message = &mt("Significant figures are incorrect, submission was not graded.");# you provided %s significant figures";
       $bgcolor=$possiblecolors{'not_charged_try'};        $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;        $button=1;
   } elsif ($award eq 'UNIT_FAIL') {    } elsif ($award eq 'UNIT_FAIL') {
Line 518  sub setgradedata { Line 518  sub setgradedata {
     } elsif ( $award eq 'INCORRECT' ) {      } elsif ( $award eq 'INCORRECT' ) {
       $Apache::lonhomework::results{"resource.$id.tries"} =        $Apache::lonhomework::results{"resource.$id.tries"} =
  $Apache::lonhomework::history{"resource.$id.tries"} + 1;   $Apache::lonhomework::history{"resource.$id.tries"} + 1;
         if (lc($Apache::lonhomework::problemstatus) eq 'no') {
     $Apache::lonhomework::results{"resource.$id.awarded"} = 0;
         }
       $Apache::lonhomework::results{"resource.$id.solved"} =        $Apache::lonhomework::results{"resource.$id.solved"} =
  'incorrect_attempted'   'incorrect_attempted'
     } elsif ( $award eq 'SUBMITTED' ) {      } elsif ( $award eq 'SUBMITTED' ) {
Line 537  sub setgradedata { Line 540  sub setgradedata {
       if (lc($Apache::lonhomework::problemstatus) eq 'no') {        if (lc($Apache::lonhomework::problemstatus) eq 'no') {
   $Apache::lonhomework::results{"resource.$id.tries"} =    $Apache::lonhomework::results{"resource.$id.tries"} =
       $Apache::lonhomework::history{"resource.$id.tries"} + 1;        $Apache::lonhomework::history{"resource.$id.tries"} + 1;
     $Apache::lonhomework::results{"resource.$id.awarded"} = 0;
       }        }
     }      }
   
Line 617  sub gradestatus { Line 621  sub gradestatus {
   
   my $status = $Apache::inputtags::status['-1'];    my $status = $Apache::inputtags::status['-1'];
   &Apache::lonxml::debug("gradestatus has :$status:");    &Apache::lonxml::debug("gradestatus has :$status:");
   if ( $status ne 'CLOSED' && $status ne 'UNAVAILABLE') {      if ( $status ne 'CLOSED' && $status ne 'UNAVAILABLE' &&
          $status ne 'INVALID_ACCESS') {  
     my $award = $Apache::lonhomework::history{"resource.$id.award"};      my $award = $Apache::lonhomework::history{"resource.$id.award"};
     my $solved = $Apache::lonhomework::history{"resource.$id.solved"};      my $solved = $Apache::lonhomework::history{"resource.$id.solved"};
     my $previous = $Apache::lonhomework::history{"resource.$id.previous"};      my $previous = $Apache::lonhomework::history{"resource.$id.previous"};

Removed from v.1.117  
changed lines
  Added in v.1.121


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