--- loncom/lonnet/perl/lonnet.pm 2002/06/27 16:03:55 1.247 +++ loncom/lonnet/perl/lonnet.pm 2002/06/27 21:11:44 1.249 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.247 2002/06/27 16:03:55 www Exp $ +# $Id: lonnet.pm,v 1.249 2002/06/27 21:11:44 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1741,8 +1741,10 @@ sub allowed { if ($thisallowed=~/X/) { if ($ENV{'acc.randomout'}) { - my $symb=&symbread(); - if ($ENV{'acc.randomout'}=~/\&$symb\&/) { return ''; } + my $symb=&symbread($uri,1); + if (($symb) && ($ENV{'acc.randomout'}=~/\&$symb\&/)) { + return ''; + } } if (&condval($statecond)) { return '2'; @@ -2699,7 +2701,7 @@ sub symbclean { # ------------------------------------------------------ Return symb list entry sub symbread { - my $thisfn=shift; + my ($thisfn,$donotrecurse)=@_; # no filename provided? try from environment unless ($thisfn) { if ($ENV{'request.symb'}) { return &symbclean($ENV{'request.symb'}); } @@ -2748,7 +2750,7 @@ sub symbread { # ----------------------------------------------- There is only one possibility my ($mapid,$resid)=split(/\./,$ids); $syval=declutter($bighash{'map_id_'.$mapid}).'___'.$resid; - } else { + } elsif (!$donotrecurse) { # ------------------------------------------ There is more than one possibility my $realpossible=0; foreach (@possibilities) { @@ -2763,6 +2765,8 @@ sub symbread { } } if ($realpossible!=1) { $syval=''; } + } else { + $syval=''; } } untie(%bighash)