--- loncom/homework/imageresponse.pm 2002/08/24 15:26:43 1.21 +++ loncom/homework/imageresponse.pm 2002/09/26 20:45:00 1.22 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # image click response style # -# $Id: imageresponse.pm,v 1.21 2002/08/24 15:26:43 harris41 Exp $ +# $Id: imageresponse.pm,v 1.22 2002/09/26 20:45:00 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -85,7 +85,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 $#names elms, picking $aopt"); $aopt=splice(@names,$aopt,1); @@ -184,7 +184,7 @@ sub end_conceptgroup { if ($target eq 'web' || $target eq 'grade') { 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]; if (defined(@{ $Apache::response::conceptgroup{"$name.area"} })) { push @{ $Apache::response::foilgroup{'names'} }, $name;