--- loncom/homework/caparesponse/caparesponse.pm 2004/02/05 18:41:06 1.126 +++ loncom/homework/caparesponse/caparesponse.pm 2004/02/05 21:04:24 1.127 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.126 2004/02/05 18:41:06 albertel Exp $ +# $Id: caparesponse.pm,v 1.127 2004/02/05 21:04:24 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -443,7 +443,10 @@ sub make_numerical_bubbles { &Math::Random::random_set_seed(@oldseed); return @bubble_values; } - #FIXME what to do when not enough incorrects specified? + if (defined($$incorrect[0]) && + scalar(@$incorrect)+1 < $number_of_bubbles) { + &Apache::lonxml::warning("Not enough incorrect answers were specified in the incorrect array, ignoring the specified incorrect answers and instead generating them."); + } } my @factors = (1.13,1.17,1.25,1.33,1.45); #default values of factors my @powers = (1..$number_of_bubbles);