--- loncom/homework/inputtags.pm 2006/12/14 04:31:32 1.211 +++ loncom/homework/inputtags.pm 2007/02/22 00:21:47 1.213 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.211 2006/12/14 04:31:32 albertel Exp $ +# $Id: inputtags.pm,v 1.213 2007/02/22 00:21:47 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -621,9 +621,11 @@ sub decideoutput { $message.= $computer; } $added_computer_text=1; - unless ($env{'course.'. + &Apache::lonnet::logthis("the course is ".$env{'request.course.id'}); + if ((!$env{'course.'. $env{'request.course.id'}. - '.disable_receipt_display'} eq 'yes') { + '.disable_receipt_display'} eq 'yes')&& + $env{'request.course.id'}) { $message.=(($target eq 'web')?'
':' '). &mt('Your receipt is').' '.&Apache::lonnet::receipt($Apache::inputtags::part). (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):''); @@ -701,10 +703,8 @@ sub decideoutput { $button=1; } elsif ($award eq 'SIG_FAIL') { my ($used,$min,$max)=split(':',$awardmsg); - my $word; - if ($used < $min) { $word=&mt('more'); } - if ($used > $max) { $word=&mt('fewer'); } - $message = &mt("Submission not graded. Use [_2] digits.",$used,$word); + my $word = ($used < $min) ? 'more' : 'fewer'; + $message = &mt("Submission not graded. Use $word digits.",$used); $bgcolor=$possiblecolors{'not_charged_try'}; $button=1; } elsif ($award eq 'UNIT_INVALID_INSTRUCTOR') {