--- loncom/lonnet/perl/lonnet.pm 2002/06/27 19:04:15 1.248 +++ 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.248 2002/06/27 19:04:15 www Exp $ +# $Id: lonnet.pm,v 1.249 2002/06/27 21:11:44 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1741,7 +1741,7 @@ sub allowed { if ($thisallowed=~/X/) { if ($ENV{'acc.randomout'}) { - my $symb=&symbread($uri); + my $symb=&symbread($uri,1); if (($symb) && ($ENV{'acc.randomout'}=~/\&$symb\&/)) { return ''; } @@ -2701,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'}); } @@ -2750,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) { @@ -2765,6 +2765,8 @@ sub symbread { } } if ($realpossible!=1) { $syval=''; } + } else { + $syval=''; } } untie(%bighash)