Diff for /loncom/homework/radiobuttonresponse.pm between versions 1.103 and 1.104

version 1.103, 2005/06/27 21:51:29 version 1.104, 2005/10/11 20:02:31
Line 291  sub whichfoils { Line 291  sub whichfoils {
     my ($truecnt,$falsecnt) = &getfoilcounts();      my ($truecnt,$falsecnt) = &getfoilcounts();
     my $count=0;      my $count=0;
     # we will add in 1 of the true statements      # we will add in 1 of the true statements
     if (($falsecnt+1)>$max) { $count=$max } else { $count=$falsecnt+1; }      if ( $max>0 && ($falsecnt+1)>$max) { $count=$max } else { $count=$falsecnt+1; $max=$count; }
     my $answer=int(&Math::Random::random_uniform() * ($count));      my $answer=int(&Math::Random::random_uniform() * ($count));
     &Apache::lonxml::debug("Count is $count, $answer is $answer");      &Apache::lonxml::debug("Count is $count, $answer is $answer");
     my @names;      my @names;

Removed from v.1.103  
changed lines
  Added in v.1.104


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