--- loncom/homework/inputtags.pm 2003/05/06 15:31:45 1.98 +++ loncom/homework/inputtags.pm 2003/05/08 15:22:03 1.99 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.98 2003/05/06 15:31:45 albertel Exp $ +# $Id: inputtags.pm,v 1.99 2003/05/08 15:22:03 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -82,7 +82,9 @@ sub start_textfield { my $resid=$Apache::inputtags::response[-1]; if ($target eq 'web') { $Apache::lonxml::evaluate--; - if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') { + if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER' && + $Apache::lonhomework::history{"resource.$id.solved"} =~/^correct/ + ) { my $partid=$Apache::inputtags::part; my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$resid.submission"}); my $cols = &Apache::lonxml::get_param('cols',$parstack,$safeeval); @@ -160,14 +162,16 @@ sub start_textline { my $result = ""; if ($target eq 'web') { $Apache::lonxml::evaluate--; - if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') { + my $partid=$Apache::inputtags::part; + my $id=$Apache::inputtags::response[-1]; + if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER' && + $Apache::lonhomework::history{"resource.$id.solved"} =~/^correct/ + ) { my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval); my $maxlength; if ($size eq '') { $size=20; } else { if ($size < 20) { $maxlength=$size; } } - my $partid=$Apache::inputtags::part; - my $id=$Apache::inputtags::response[-1]; my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"}); if ($Apache::lonhomework::type ne 'exam') { $result= '