version 1.249, 2002/06/27 21:11:44
|
version 1.250, 2002/07/04 15:47:18
|
Line 2271 sub courseresdata {
|
Line 2271 sub courseresdata {
|
my ($coursenum,$coursedomain,@which)=@_; |
my ($coursenum,$coursedomain,@which)=@_; |
my $coursehom=&homeserver($coursenum,$coursedomain); |
my $coursehom=&homeserver($coursenum,$coursedomain); |
my $hashid=$coursenum.':'.$coursedomain; |
my $hashid=$coursenum.':'.$coursedomain; |
unless (defined($courseresdatacache{$hashid.'.time'})) { |
my $dodump=0; |
unless (time-$courseresdatacache{$hashid.'.time'}<300) { |
if (!defined($courseresdatacache{$hashid.'.time'})) { |
my $coursehom=&homeserver($coursenum,$coursedomain); |
$dodump=1; |
if ($coursehom) { |
} else { |
my $dumpreply=&reply('dump:'.$coursedomain.':'.$coursenum. |
if (time-$courseresdatacache{$hashid.'.time'}>300) { $dodump=1; } |
':resourcedata:.',$coursehom); |
} |
unless ($dumpreply=~/^error\:/) { |
if ($dodump) { |
$courseresdatacache{$hashid.'.time'}=time; |
my $coursehom=&homeserver($coursenum,$coursedomain); |
$courseresdatacache{$hashid}=$dumpreply; |
if ($coursehom) { |
} |
my $dumpreply=&reply('dump:'.$coursedomain.':'.$coursenum. |
} |
':resourcedata:.',$coursehom); |
} |
if ($dumpreply!~/^error\:/) { |
|
$courseresdatacache{$hashid.'.time'}=time; |
|
$courseresdatacache{$hashid}=$dumpreply; |
|
} |
|
} |
|
} |
|
my @pairs=split(/\&/,$courseresdatacache{$hashid}); |
|
my %returnhash=(); |
|
foreach (@pairs) { |
|
my ($key,$value)=split(/=/,$_); |
|
$returnhash{unescape($key)}=unescape($value); |
} |
} |
my @pairs=split(/\&/,$courseresdatacache{$hashid}); |
|
my %returnhash=(); |
|
foreach (@pairs) { |
|
my ($key,$value)=split(/=/,$_); |
|
$returnhash{unescape($key)}=unescape($value); |
|
} |
|
my $item; |
my $item; |
foreach $item (@which) { |
foreach $item (@which) { |
if ($returnhash{$item}) { return $returnhash{$item}; } |
if ($returnhash{$item}) { return $returnhash{$item}; } |
} |
} |
return ''; |
return ''; |
} |
} |
|
|
# --------------------------------------------------------- Value of a Variable |
# --------------------------------------------------------- Value of a Variable |