Diff for /rat/lonuserstate.pm between versions 1.105 and 1.106

version 1.105, 2006/02/23 18:17:37 version 1.106, 2006/02/28 20:56:40
Line 93  sub processversionfile { Line 93  sub processversionfile {
     my %versions=&Apache::lonnet::dump('resourceversions',      my %versions=&Apache::lonnet::dump('resourceversions',
        $cenv{'domain'},         $cenv{'domain'},
        $cenv{'num'});         $cenv{'num'});
     foreach (keys %versions) {      foreach my $ver (keys(%versions)) {
  if ($_=~/^error\:/) { return; }   if ($ver=~/^error\:/) { return; }
  $hash{'version_'.$_}=$versions{$_};   $hash{'version_'.$ver}=$versions{$ver};
     }      }
 }  }
   
Line 379  sub traceroute { Line 379  sub traceroute {
     }      }
  }   }
  if (defined($hash{'to_'.$rid})) {   if (defined($hash{'to_'.$rid})) {
     foreach (split(/\,/,$hash{'to_'.$rid})) {      foreach my $id (split(/\,/,$hash{'to_'.$rid})) {
  my $further=$sofar;   my $further=$sofar;
                 if ($hash{'undercond_'.$_}) {                  if ($hash{'undercond_'.$id}) {
     if (defined($hash{'condid_'.$hash{'undercond_'.$_}})) {      if (defined($hash{'condid_'.$hash{'undercond_'.$id}})) {
  $further=simplify('('.'_'.$rid.')&('.   $further=simplify('('.'_'.$rid.')&('.
   $hash{'condid_'.$hash{'undercond_'.$_}}.')');    $hash{'condid_'.$hash{'undercond_'.$id}}.')');
     } else {      } else {
  $errtext.='Undefined condition ID: '   $errtext.='Undefined condition ID: '
     .$hash{'undercond_'.$_}.'. ';      .$hash{'undercond_'.$id}.'. ';
     }      }
                 }                  }
                 $newsofar=&traceroute($further,$hash{'goesto_'.$_},$beenhere,                  $newsofar=&traceroute($further,$hash{'goesto_'.$id},$beenhere,
       $encflag,$hdnflag);        $encflag,$hdnflag);
     }      }
  }   }
Line 486  sub hiddenurls { Line 486  sub hiddenurls {
         my $mpc=$hash{'map_pc_'.$hash{'src_'.$rid}};          my $mpc=$hash{'map_pc_'.$hash{'src_'.$rid}};
 # ------------------------------------------- put existing resources into array  # ------------------------------------------- put existing resources into array
         my @currentrids=();          my @currentrids=();
         foreach (sort(keys(%hash))) {          foreach my $key (sort(keys(%hash))) {
     if ($_=~/^src_($mpc\.\d+)/) {      if ($key=~/^src_($mpc\.\d+)/) {
  if ($hash{'src_'.$1}) { push @currentrids, $1; }   if ($hash{'src_'.$1}) { push @currentrids, $1; }
             }              }
         }          }
Line 585  sub readmap { Line 585  sub readmap {
     &hiddenurls();      &hiddenurls();
  }   }
 # ------------------------------------------------------- Put versions into src  # ------------------------------------------------------- Put versions into src
  foreach (keys %hash) {   foreach my $key (keys(%hash)) {
     if ($_=~/^src\_/) {      if ($key=~/^src\_/) {
  $hash{$_}=&putinversion($hash{$_});   $hash{$key}=&putinversion($hash{$key});
     }      }
  }   }
 # ---------------------------------------------------------------- Encrypt URLs  # ---------------------------------------------------------------- Encrypt URLs
  foreach (keys %encurl) {   foreach my $id (keys(%encurl)) {
 #    $hash{'src_'.$_}=&Apache::lonenc::encrypted($hash{'src_'.$_});  #    $hash{'src_'.$id}=&Apache::lonenc::encrypted($hash{'src_'.$id});
     $hash{'encrypted_'.$_}=1;      $hash{'encrypted_'.$id}=1;
  }   }
 # ----------------------------------------------- Close hashes to finally store  # ----------------------------------------------- Close hashes to finally store
 # --------------------------------- Routine must pass this point, no early outs  # --------------------------------- Routine must pass this point, no early outs

Removed from v.1.105  
changed lines
  Added in v.1.106


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