Diff for /loncom/lonnet/perl/lonnet.pm between versions 1.37 and 1.39

version 1.37, 2000/10/06 21:00:05 version 1.39, 2000/10/07 10:09:53
Line 28 Line 28
 # restore            : returns hash for this url  # restore            : returns hash for this url
 # eget(namesp,array) : returns hash with keys from array filled in from namesp  # eget(namesp,array) : returns hash with keys from array filled in from namesp
 # get(namesp,array)  : returns hash with keys from array filled in from namesp  # get(namesp,array)  : returns hash with keys from array filled in from namesp
 # del(namesp,array)  : deletes keys out of arry from namesp  # del(namesp,array)  : deletes keys out of array from namesp
 # put(namesp,hash)   : stores hash in namesp  # put(namesp,hash)   : stores hash in namesp
 # dump(namesp)       : dumps the complete namespace into a hash  # dump(namesp)       : dumps the complete namespace into a hash
 # ssi(url,hash)      : does a complete request cycle on url to localhost, posts  # ssi(url,hash)      : does a complete request cycle on url to localhost, posts
Line 40 Line 40
 # varval(name)       : value of a variable  # varval(name)       : value of a variable
 # refreshstate()     : refresh the state information string  # refreshstate()     : refresh the state information string
 # symblist(map,hash) : Updates symbolic storage links  # symblist(map,hash) : Updates symbolic storage links
   # symbread(filename) : returns the data handle
 # rndseed()          : returns a random seed    # rndseed()          : returns a random seed  
 # getfile(filename)  : returns the contents of filename, or a -1 if it can't  # getfile(filename)  : returns the contents of filename, or a -1 if it can't
 #                      be found, replicates and subscribes to the file  #                      be found, replicates and subscribes to the file
Line 487  sub coursedescription { Line 488  sub coursedescription {
            } split(/\&/,$rep);             } split(/\&/,$rep);
            $returnhash{'url'}='/res/'.declutter($returnhash{'url'});             $returnhash{'url'}='/res/'.declutter($returnhash{'url'});
            $returnhash{'fn'}=$perlvar{'lonDaemons'}.'/tmp/'.             $returnhash{'fn'}=$perlvar{'lonDaemons'}.'/tmp/'.
        $ENV{'user.name.'}.'_'.$cdomain.'_'.$cnum;         $ENV{'user.name'}.'_'.$cdomain.'_'.$cnum;
    put ('coursedescriptions',%cachehash);     put ('coursedescriptions',%cachehash);
            return %returnhash;             return %returnhash;
        }         }
Line 1043  sub symbread { Line 1044  sub symbread {
               if ($ids) {                if ($ids) {
 # ------------------------------------------------------------------- Has ID(s)  # ------------------------------------------------------------------- Has ID(s)
                  my @possibilities=split(/\,/,$ids);                   my @possibilities=split(/\,/,$ids);
                  if ($#possibilities==1) {                   if ($#possibilities==0) {
   # ----------------------------------------------- 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 {                   } else {
                      $syval='';  # ------------------------------------------ There is more than one possibility
                        my $realpossible=0;
                        map {
    my $file=$bighash{'src_'.$_};
                            if (&allowed('bre',$file)) {
                my ($mapid,$resid)=split(/\./,$_);
                               if ($bighash{'map_type_'.$mapid} ne 'page') {
    $realpossible++;
                                   $syval=declutter($bighash{'map_id_'.$mapid}).
                                          '___'.$resid;
                               }
    }
                        } @possibilities;
        if ($realpossible!=1) { $syval=''; }
                  }                   }
       }        }
               untie(%bighash)                untie(%bighash)
            }              } 
         }          }
         return $syval.'___'.$thisfn;          if ($syval) { return $syval.'___'.$thisfn; }
     }      }
     return '';      return '';
 }  }

Removed from v.1.37  
changed lines
  Added in v.1.39


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