--- loncom/homework/inputtags.pm 2006/01/04 05:56:16 1.186 +++ loncom/homework/inputtags.pm 2006/06/09 16:31:00 1.186.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.186 2006/01/04 05:56:16 albertel Exp $ +# $Id: inputtags.pm,v 1.186.2.1 2006/06/09 16:31:00 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -229,7 +229,9 @@ 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') { + if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER' + || ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER' && + $Apache::lonhomework::history{"resource.$partid.solved"} !~ /^correct/ )) { my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval); my $maxlength; if ($size eq '') { $size=20; } else { @@ -244,12 +246,17 @@ sub start_textline { } my $readonly=&Apache::lonxml::get_param('readonly',$parstack, $safeeval); - if (lc($readonly) eq 'yes') { + if (lc($readonly) eq 'yes' + || $Apache::inputtags::status[-1] eq 'CANNOT_ANSWER') { $readonly=' readonly="readonly" '; } else { $readonly=''; } - $result.= ''; } } else {