[LON-CAPA-cvs] cvs: rat / lonuserstate.pm
www
lon-capa-cvs@mail.lon-capa.org
Sun, 07 Jul 2002 17:52:20 -0000
www Sun Jul 7 13:52:20 2002 EDT
Modified files:
/rat lonuserstate.pm
Log:
Since in &pickrandom the leftovers of @currentids are what will be deleted,
one needs to elimate $rndpick many elements.
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.32 rat/lonuserstate.pm:1.33
--- rat/lonuserstate.pm:1.32 Thu Jun 27 10:08:26 2002
+++ rat/lonuserstate.pm Sun Jul 7 13:52:20 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construct and maintain state and binary representation of course for user
#
-# $Id: lonuserstate.pm,v 1.32 2002/06/27 14:08:26 www Exp $
+# $Id: lonuserstate.pm,v 1.33 2002/07/07 17:52:20 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -423,7 +423,7 @@
next if ($#currentrids<$rndpick);
# -------------------------------- randomly eliminate the ones that should stay
srand(&Apache::lonnet::rndseed($rid)); # use rid instead of symb
- for (my $i=1;$i<=$#currentrids+1-$rndpick;$i++) {
+ for (my $i=1;$i<=$rndpick;$i++) {
while (1) {
my $randomidx=int(rand($#currentrids+1));
if ($currentrids[$randomidx]) {