Diff for /loncom/homework/inputtags.pm between versions 1.112 and 1.114.2.2

version 1.112, 2003/08/04 21:18:55 version 1.114.2.2, 2003/09/23 15:44:39
Line 402  sub decideoutput { Line 402  sub decideoutput {
       $bgcolor=$possiblecolors{'not_charged_try'};        $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;        $button=1;
   } elsif ($award eq 'MISORDERED_RANK') {    } elsif ($award eq 'MISORDERED_RANK') {
       $message = 'You have provided an invalid ranking, please refer to '.        $message = 'You have provided an invalid ranking';
   &Apache::loncommon::help_open_topic('Ranking_Problems','help on ranking problems').'.';        if ($target ne 'tex') {
     $message.=', please refer to '.&Apache::loncommon::help_open_topic('Ranking_Problems','help on ranking problems').'.';
         }
       $bgcolor=$possiblecolors{'not_charged_try'};        $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;        $button=1;
   } elsif ($award eq 'INVALID_FILETYPE') {    } elsif ($award eq 'INVALID_FILETYPE') {
Line 415  sub decideoutput { Line 417  sub decideoutput {
       $bgcolor=$possiblecolors{'not_charged_try'};        $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;        $button=1;
   } elsif ($award eq 'UNIT_FAIL') {    } elsif ($award eq 'UNIT_FAIL') {
       $message = "Units incorrect. ".        $message = "Units incorrect. ";
        &Apache::loncommon::help_open_topic('Physical_Units'); #Computer reads units as %s";        if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units');} #Computer reads units as %s";
       $bgcolor=$possiblecolors{'not_charged_try'};        $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;        $button=1;
   } elsif ($award eq 'UNIT_NOTNEEDED') {    } elsif ($award eq 'UNIT_NOTNEEDED') {
Line 424  sub decideoutput { Line 426  sub decideoutput {
       $bgcolor=$possiblecolors{'not_charged_try'};        $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;        $button=1;
   } elsif ($award eq 'NO_UNIT') {    } elsif ($award eq 'NO_UNIT') {
       $message = "Units required".        $message = "Units required";
   &Apache::loncommon::help_open_topic('Physical_Units');        if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units')};
       $bgcolor=$possiblecolors{'not_charged_try'};        $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;        $button=1;
   } elsif ($award eq 'BAD_FORMULA') {    } elsif ($award eq 'BAD_FORMULA') {
Line 452  sub decideoutput { Line 454  sub decideoutput {
       $message = "Unknown message: $award";        $message = "Unknown message: $award";
       $button=1;        $button=1;
   }    }
   if (lc($Apache::lonhomework::problemstatus) eq 'no') {    if (lc($Apache::lonhomework::problemstatus) eq 'no'  && 
         $Apache::inputtags::status[-1] ne 'SHOW_ANSWER') {
       $message = "Answer Submitted";        $message = "Answer Submitted";
       $bgcolor=$possiblecolors{'correct'};        $bgcolor=$possiblecolors{'correct'};
       $button=1;        $button=1;
Line 514  sub setgradedata { Line 517  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) ne '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 533  sub setgradedata { Line 539  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;
       }        }
     }      }
   

Removed from v.1.112  
changed lines
  Added in v.1.114.2.2


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