--- loncom/homework/inputtags.pm 2004/03/31 05:23:59 1.138 +++ loncom/homework/inputtags.pm 2004/04/29 07:57:47 1.141 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.138 2004/03/31 05:23:59 albertel Exp $ +# $Id: inputtags.pm,v 1.141 2004/04/29 07:57:47 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -421,19 +421,17 @@ sub decideoutput { $bgcolor=$possiblecolors{'not_charged_try'}; $button=1; } elsif ($award eq 'UNIT_INVALID_STUDENT') { - $message = &mt('Unable to interpret units. Computer reads units as "[_1]"', - $awardmsg); + $message = &mt('Unable to interpret units. Computer reads units as "[_1]"',''.$awardmsg.''); if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units');} $bgcolor=$possiblecolors{'not_charged_try'}; $button=1; } elsif ($award eq 'UNIT_FAIL' || $award eq 'UNIT_IRRECONCIBLE') { - $message = &mt('Units incorrect. Computer reads units as "[_1]"', - $awardmsg); + $message = &mt('Incompatible units. No conversion found between "[_1]" and the required units.',''.$awardmsg.''); if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units');} $bgcolor=$possiblecolors{'not_charged_try'}; $button=1; } elsif ($award eq 'UNIT_NOTNEEDED') { - $message = &mt('Only a number required. Computer reads units of "[_1]"',$awardmsg); + $message = &mt('Only a number required. Computer reads units of "[_1]"',''.$awardmsg.''); $bgcolor=$possiblecolors{'not_charged_try'}; $button=1; } elsif ($award eq 'NO_UNIT') { @@ -487,6 +485,9 @@ sub removealldata { sub setgradedata { my ($award,$msg,$id,$previously_used) = @_; # if the student already has it correct, don't modify the status + if ($Apache::lonhomework::scantronmode && defined($ENV{'form.CODE'})) { + $Apache::lonhomework::results{"resource.CODE"}=$ENV{'form.CODE'}; + } if (!$Apache::lonhomework::scantronmode && $Apache::inputtags::status['-1'] ne 'CAN_ANSWER' && $Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER') {