Diff for /loncom/lonnet/perl/lonnet.pm between versions 1.247 and 1.249

version 1.247, 2002/06/27 16:03:55 version 1.249, 2002/06/27 21:11:44
Line 1741  sub allowed { Line 1741  sub allowed {
   
    if ($thisallowed=~/X/) {     if ($thisallowed=~/X/) {
       if ($ENV{'acc.randomout'}) {        if ($ENV{'acc.randomout'}) {
          my $symb=&symbread();           my $symb=&symbread($uri,1);
          if ($ENV{'acc.randomout'}=~/\&$symb\&/) { return ''; }           if (($symb) && ($ENV{'acc.randomout'}=~/\&$symb\&/)) { 
               return ''; 
            }
       }        }
       if (&condval($statecond)) {        if (&condval($statecond)) {
  return '2';   return '2';
Line 2699  sub symbclean { Line 2701  sub symbclean {
 # ------------------------------------------------------ Return symb list entry  # ------------------------------------------------------ Return symb list entry
   
 sub symbread {  sub symbread {
     my $thisfn=shift;      my ($thisfn,$donotrecurse)=@_;
 # no filename provided? try from environment  # no filename provided? try from environment
     unless ($thisfn) {      unless ($thisfn) {
         if ($ENV{'request.symb'}) { return &symbclean($ENV{'request.symb'}); }          if ($ENV{'request.symb'}) { return &symbclean($ENV{'request.symb'}); }
Line 2748  sub symbread { Line 2750  sub symbread {
 # ----------------------------------------------- There is only one possibility  # ----------------------------------------------- There is only one possibility
      my ($mapid,$resid)=split(/\./,$ids);       my ($mapid,$resid)=split(/\./,$ids);
                      $syval=declutter($bighash{'map_id_'.$mapid}).'___'.$resid;                       $syval=declutter($bighash{'map_id_'.$mapid}).'___'.$resid;
                  } else {                   } elsif (!$donotrecurse) {
 # ------------------------------------------ There is more than one possibility  # ------------------------------------------ There is more than one possibility
                      my $realpossible=0;                       my $realpossible=0;
                      foreach (@possibilities) {                       foreach (@possibilities) {
Line 2763  sub symbread { Line 2765  sub symbread {
  }   }
                      }                       }
      if ($realpossible!=1) { $syval=''; }       if ($realpossible!=1) { $syval=''; }
                    } else {
                        $syval='';
                  }                   }
       }        }
               untie(%bighash)                untie(%bighash)

Removed from v.1.247  
changed lines
  Added in v.1.249


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