[LON-CAPA-cvs] cvs: loncom /homework/caparesponse caparesponse.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 05 Feb 2004 21:04:24 -0000
albertel Thu Feb 5 16:04:24 2004 EDT
Modified files:
/loncom/homework/caparesponse caparesponse.pm
Log:
- BUG#2684, warn if ignoring incorrect speification because user under specified.
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.126 loncom/homework/caparesponse/caparesponse.pm:1.127
--- loncom/homework/caparesponse/caparesponse.pm:1.126 Thu Feb 5 13:41:06 2004
+++ loncom/homework/caparesponse/caparesponse.pm Thu Feb 5 16:04:24 2004
@@ -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 @@
&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);