--- loncom/homework/inputtags.pm 2002/10/28 19:19:19 1.70 +++ loncom/homework/inputtags.pm 2002/11/08 20:34:10 1.73 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.70 2002/10/28 19:19:19 sakharuk Exp $ +# $Id: inputtags.pm,v 1.73 2002/11/08 20:34:10 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -146,12 +146,17 @@ sub start_textline { $Apache::lonxml::evaluate--; if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') { my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval); - if ($size eq '') { $size=20; } + 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"}); - $result= ''; + if ($Apache::lonhomework::type ne 'exam') { + $result= ''; + } } else { #right or wrong don't show what was last typed in. #$result=''.$oldresponse.''; @@ -308,7 +313,8 @@ sub decideoutput { sub setgradedata { my ($award,$id,$previously_used) = @_; # if the student already has it correct, don't modify the status - if ($Apache::inputtags::status['-1'] ne 'CAN_ANSWER') { + if ($Apache::inputtags::status['-1'] ne 'CAN_ANSWER' && + $Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER') { $Apache::lonhomework::results{"resource.$id.afterduedate"}=$award; return ''; } elsif ( $Apache::lonhomework::history{"resource.$id.solved"} !~