--- loncom/homework/optionresponse.pm 2002/08/26 18:15:22 1.46 +++ loncom/homework/optionresponse.pm 2002/09/26 20:45:00 1.47 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: optionresponse.pm,v 1.46 2002/08/26 18:15:22 sakharuk Exp $ +# $Id: optionresponse.pm,v 1.47 2002/09/26 20:45:00 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -243,7 +243,7 @@ sub whichfoils { if (&Apache::response::showallfoils()) { $aopt=0; } else { - $aopt=int(rand($#names+1)); + $aopt=int(&Math::Random::random_uniform() * ($#names+1)); } &Apache::lonxml::debug("From $#whichopt $max $#names elms, picking $aopt"); $aopt=splice(@names,$aopt,1); @@ -373,7 +373,7 @@ sub end_conceptgroup { #if not there aren't any foils to display and thus no question if (defined(@{ $Apache::response::conceptgroup{'names'} })) { my @names = @{ $Apache::response::conceptgroup{'names'} }; - my $pick=int rand $#names+1; + my $pick=int(&Math::Random::random_uniform() * ($#names+1)); my $name=$names[$pick]; push @{ $Apache::response::foilgroup{'names'} }, $name; $Apache::response::foilgroup{"$name.value"} =