Diff for /rat/lonuserstate.pm between versions 1.55 and 1.60

version 1.55, 2003/03/02 01:43:01 version 1.60, 2003/09/19 18:20:35
Line 97  sub loadmap { Line 97  sub loadmap {
   
     my $instr=&Apache::lonnet::getfile($fn);      my $instr=&Apache::lonnet::getfile($fn);
   
     unless ($instr == -1) {      unless ($instr eq -1) {
   
 # Successfully got file, parse it  # Successfully got file, parse it
   
Line 120  sub loadmap { Line 120  sub loadmap {
                     $hash{'kind_'.$rid}='res';                      $hash{'kind_'.$rid}='res';
                     $hash{'title_'.$rid}=$token->[2]->{'title'};                      $hash{'title_'.$rid}=$token->[2]->{'title'};
                     my $turi=$token->[2]->{'src'};                      my $turi=$token->[2]->{'src'};
                     $Apache::lonnet::titlecache{      &Apache::lonnet::do_cache(\%Apache::lonnet::titlecache,
      &Apache::lonnet::symbclean(         &Apache::lonnet::symbclean(
                       &Apache::lonnet::declutter($uri).'___'.                          &Apache::lonnet::declutter($uri).'___'.
                       $token->[2]->{'id'}.'___'.                          $token->[2]->{'id'}.'___'.
       &Apache::lonnet::declutter($turi))}=          &Apache::lonnet::declutter($turi)),
                           $token->[2]->{'title'};        $token->[2]->{'title'});
                     unless ($ispage) {                      unless ($ispage) {
                         $turi=~/\.(\w+)$/;                          $turi=~/\.(\w+)$/;
                         my $embstyle=&Apache::loncommon::fileembstyle($1);                          my $embstyle=&Apache::loncommon::fileembstyle($1);
Line 389  sub accinit { Line 389  sub accinit {
             }              }
             if (defined($acchash{'acc.res.'.$short.'.'.$uripath})) {              if (defined($acchash{'acc.res.'.$short.'.'.$uripath})) {
                 if ($acchash{'acc.res.'.$short.'.'.$uripath}=~                  if ($acchash{'acc.res.'.$short.'.'.$uripath}=~
                    /(\&$urifile\:[^\&]*)/) {                     /(\&\Q$urifile\E\:[^\&]*)/) {
     my $replace=$1;      my $replace=$1;
                     my $regexp=$replace;                      my $regexp=$replace;
                     $regexp=~s/\|/\\\|/g;                      $regexp=~s/\|/\\\|/g;
Line 443  sub pickrandom { Line 443  sub pickrandom {
  my (undef,$id)=split(/\./,$rid);   my (undef,$id)=split(/\./,$rid);
         if ($randompickseed{$rid}) { $id=$randompickseed{$rid}; }          if ($randompickseed{$rid}) { $id=$randompickseed{$rid}; }
  my $rndseed=&Apache::lonnet::rndseed($id); # use id instead of symb   my $rndseed=&Apache::lonnet::rndseed($id); # use id instead of symb
  &Math::Random::random_set_seed_from_phrase($rndseed);   &Apache::lonnet::setup_random_from_rndseed($rndseed);
  my @whichids=&Math::Random::random_permuted_index($#currentrids+1);   my @whichids=&Math::Random::random_permuted_index($#currentrids+1);
         for (my $i=1;$i<=$rndpick;$i++) { $currentrids[$whichids[$i]]=''; }          for (my $i=1;$i<=$rndpick;$i++) { $currentrids[$whichids[$i]]=''; }
  #&Apache::lonnet::logthis("$id,$rndseed,".join(':',@whichids));   #&Apache::lonnet::logthis("$id,$rndseed,".join(':',@whichids));

Removed from v.1.55  
changed lines
  Added in v.1.60


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