--- loncom/homework/caparesponse/caparesponse.pm 2007/04/26 23:15:43 1.213 +++ loncom/homework/caparesponse/caparesponse.pm 2007/05/22 00:45:43 1.214 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.213 2007/04/26 23:15:43 albertel Exp $ +# $Id: caparesponse.pm,v 1.214 2007/05/22 00:45:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -827,7 +827,8 @@ sub check_for_answer_errors { use Data::Dumper; &Apache::lonxml::debug("count dump is ".&Dumper(\%counts)); my $expected_number_of_inputs = (keys(%counts))[0]; - if ( $expected_number_of_inputs != scalar(@Apache::inputtags::inputlist)) { + if ( $expected_number_of_inputs > 0 + && $expected_number_of_inputs != scalar(@Apache::inputtags::inputlist)) { &Apache::lonxml::error(&mt("Expected [_1] input fields, but there were only [_2] seen.", $expected_number_of_inputs, scalar(@Apache::inputtags::inputlist)));