Diff for /loncom/lonnet/perl/lonnet.pm between versions 1.250 and 1.251

version 1.250, 2002/07/04 15:47:18 version 1.251, 2002/07/04 15:56:17
Line 2278  sub courseresdata { Line 2278  sub courseresdata {
  if (time-$courseresdatacache{$hashid.'.time'}>300) { $dodump=1; }   if (time-$courseresdatacache{$hashid.'.time'}>300) { $dodump=1; }
     }      }
     if ($dodump) {      if ($dodump) {
  my $coursehom=&homeserver($coursenum,$coursedomain);   my %dumpreply=&dump('resourcedata',$coursedomain,$coursenum);
  if ($coursehom) {   my ($tmp) = keys(%dumpreply);
     my $dumpreply=&reply('dump:'.$coursedomain.':'.$coursenum.   if ($tmp !~ /^(con_lost|error|no_such_host)/i) {
  ':resourcedata:.',$coursehom);      $courseresdatacache{$hashid.'.time'}=time;
     if ($dumpreply!~/^error\:/) {      $courseresdatacache{$hashid}=\%dumpreply;
  $courseresdatacache{$hashid.'.time'}=time;  
  $courseresdatacache{$hashid}=$dumpreply;  
     }  
  }   }
     }      }
     my @pairs=split(/\&/,$courseresdatacache{$hashid});      foreach my $item (@which) {
     my %returnhash=();   if ($courseresdatacache{$hashid}->{$item}) {
     foreach (@pairs) {      return $courseresdatacache{$hashid}->{$item};
  my ($key,$value)=split(/=/,$_);   }
  $returnhash{unescape($key)}=unescape($value);  
     }  
     my $item;  
     foreach $item (@which) {  
  if ($returnhash{$item}) { return $returnhash{$item}; }  
     }      }
     return '';      return '';
 }  }

Removed from v.1.250  
changed lines
  Added in v.1.251


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