Diff for /loncom/homework/optionresponse.pm between versions 1.46 and 1.47

version 1.46, 2002/08/26 18:15:22 version 1.47, 2002/09/26 20:45:00
Line 243  sub whichfoils { Line 243  sub whichfoils {
     if (&Apache::response::showallfoils()) {      if (&Apache::response::showallfoils()) {
       $aopt=0;        $aopt=0;
     } else {      } else {
       $aopt=int(rand($#names+1));        $aopt=int(&Math::Random::random_uniform() * ($#names+1));
     }      }
     &Apache::lonxml::debug("From $#whichopt $max $#names elms, picking $aopt");      &Apache::lonxml::debug("From $#whichopt $max $#names elms, picking $aopt");
     $aopt=splice(@names,$aopt,1);      $aopt=splice(@names,$aopt,1);
Line 373  sub end_conceptgroup { Line 373  sub end_conceptgroup {
     #if not there aren't any foils to display and thus no question      #if not there aren't any foils to display and thus no question
     if (defined(@{ $Apache::response::conceptgroup{'names'} })) {      if (defined(@{ $Apache::response::conceptgroup{'names'} })) {
       my @names = @{ $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];        my $name=$names[$pick];
       push @{ $Apache::response::foilgroup{'names'} }, $name;        push @{ $Apache::response::foilgroup{'names'} }, $name;
       $Apache::response::foilgroup{"$name.value"} =        $Apache::response::foilgroup{"$name.value"} =

Removed from v.1.46  
changed lines
  Added in v.1.47


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>