--- loncom/homework/inputtags.pm 2006/06/30 04:56:56 1.199 +++ loncom/homework/inputtags.pm 2006/07/20 21:48:07 1.204 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.199 2006/06/30 04:56:56 albertel Exp $ +# $Id: inputtags.pm,v 1.204 2006/07/20 21:48:07 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -283,9 +283,7 @@ sub start_textline { $Apache::lonxml::evaluate--; my $partid=$Apache::inputtags::part; my $id=$Apache::inputtags::response[-1]; - if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER' - || ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER' && - $Apache::lonhomework::history{"resource.$partid.solved"} !~ /^correct/ )) { + if (!&Apache::response::show_answer()) { my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval); my $maxlength; if ($size eq '') { $size=20; } else { @@ -540,10 +538,11 @@ sub decideoutput { my $bgcolor='orange'; my $added_computer_text=0; my %possiblecolors = - ( 'correct' => '#aaffaa', - 'charged_try' => '#ffaaaa', + ( 'correct' => '#aaffaa', + 'charged_try' => '#ffaaaa', 'not_charged_try' => '#ffffaa', - 'no_message' => '#fffff', + 'no_grade' => '#ffffaa', + 'no_message' => '#ffffff', ); my $part = $Apache::inputtags::part; @@ -702,7 +701,7 @@ sub decideoutput { $button=1; } elsif ($award eq 'SUBMITTED') { $message = &mt("Your submission has been recorded."); - $bgcolor=$possiblecolors{'correct'}; + $bgcolor=$possiblecolors{'no_grade'}; $button=1; } elsif ($award eq 'DRAFT') { $message = &mt("A draft copy has been saved."); @@ -741,7 +740,7 @@ sub decideoutput { if (lc($Apache::lonhomework::problemstatus) eq 'no' && $Apache::inputtags::status[-1] ne 'SHOW_ANSWER') { $message = &mt("Answer Submitted: Your final submission will be graded after the due date."); - $bgcolor=$possiblecolors{'correct'}; + $bgcolor=$possiblecolors{'no_grade'}; $button=1; } if ($Apache::inputtags::status[-1] eq 'SHOW_ANSWER' &&