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

version 1.246, 2002/06/27 14:08:06 version 1.249, 2002/06/27 21:11:44
Line 1740  sub allowed { Line 1740  sub allowed {
 # Restricted by state or randomout?  # Restricted by state or randomout?
   
    if ($thisallowed=~/X/) {     if ($thisallowed=~/X/) {
       if ((&condval($statecond)) &&         if ($ENV{'acc.randomout'}) {
           (!$ENV{'acc.randomout'}=~/\&$ENV{'request.symb'}\&/)) {           my $symb=&symbread($uri,1);
            if (($symb) && ($ENV{'acc.randomout'}=~/\&$symb\&/)) { 
               return ''; 
            }
         }
         if (&condval($statecond)) {
  return '2';   return '2';
       } else {        } else {
          return '';           return '';
Line 2696  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 2745  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 2760  sub symbread { Line 2765  sub symbread {
  }   }
                      }                       }
      if ($realpossible!=1) { $syval=''; }       if ($realpossible!=1) { $syval=''; }
                    } else {
                        $syval='';
                  }                   }
       }        }
               untie(%bighash)                untie(%bighash)

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


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