--- rat/lonuserstate.pm 2003/03/02 01:43:01 1.55 +++ rat/lonuserstate.pm 2003/04/30 21:13:57 1.58 @@ -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.55 2003/03/02 01:43:01 www Exp $ +# $Id: lonuserstate.pm,v 1.58 2003/04/30 21:13:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -97,7 +97,7 @@ sub loadmap { my $instr=&Apache::lonnet::getfile($fn); - unless ($instr == -1) { + unless ($instr eq -1) { # Successfully got file, parse it @@ -389,7 +389,7 @@ sub accinit { } if (defined($acchash{'acc.res.'.$short.'.'.$uripath})) { if ($acchash{'acc.res.'.$short.'.'.$uripath}=~ - /(\&$urifile\:[^\&]*)/) { + /(\&\Q$urifile\E\:[^\&]*)/) { my $replace=$1; my $regexp=$replace; $regexp=~s/\|/\\\|/g; @@ -443,7 +443,7 @@ sub pickrandom { my (undef,$id)=split(/\./,$rid); if ($randompickseed{$rid}) { $id=$randompickseed{$rid}; } my $rndseed=&Apache::lonnet::rndseed($id); # use id instead of symb - &Math::Random::random_set_seed_from_phrase($rndseed); + &Apache::lonnet::setup_random_from_rndseed($rndseed); my @whichids=&Math::Random::random_permuted_index($#currentrids+1); for (my $i=1;$i<=$rndpick;$i++) { $currentrids[$whichids[$i]]=''; } #&Apache::lonnet::logthis("$id,$rndseed,".join(':',@whichids));