version 1.9, 2002/07/30 23:07:10
|
version 1.10, 2002/08/01 20:49:06
|
Line 246 smoothly.
|
Line 246 smoothly.
|
=cut |
=cut |
|
|
sub ProcessTopResourceMap { |
sub ProcessTopResourceMap { |
my ($cache,$c)=@_; |
my ($cache,$c,$r)=@_; |
my %hash; |
my %hash; |
my $fn=$ENV{'request.course.fn'}; |
my $fn=$ENV{'request.course.fn'}; |
if(-e "$fn.db") { |
if(-e "$fn.db") { |
Line 255 sub ProcessTopResourceMap {
|
Line 255 sub ProcessTopResourceMap {
|
if($c->aborted()) { |
if($c->aborted()) { |
return; |
return; |
} |
} |
if(tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER,0640)) { |
if(tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640)) { |
last; |
last; |
} |
} |
$tieTries++; |
$tieTries++; |
Line 337 sub ProcessTopResourceMap {
|
Line 337 sub ProcessTopResourceMap {
|
':'.$currentResourceID; |
':'.$currentResourceID; |
} |
} |
|
|
$cache->{$currentResourceID.':source'} = |
|
$hash{'src_'.$currentResourceID}; |
|
my $meta=$hash{'src_'.$currentResourceID}; |
my $meta=$hash{'src_'.$currentResourceID}; |
# $cache->{$currentResourceID.':title'}= |
# $cache->{$currentResourceID.':title'}= |
# &Apache::lonnet::metdata($meta,'title'); |
# &Apache::lonnet::metdata($meta,'title'); |
Line 531 sub ProcessClasslist {
|
Line 529 sub ProcessClasslist {
|
|
|
$cache->{$name.':username'}=$studentName; |
$cache->{$name.':username'}=$studentName; |
$cache->{$name.':domain'}=$studentDomain; |
$cache->{$name.':domain'}=$studentDomain; |
|
# Initialize timestamp for student |
if(!defined($cache->{$name.':lastDownloadTime'})) { |
if(!defined($cache->{$name.':lastDownloadTime'})) { |
$cache->{$name.':lastDownloadTime'}='Not downloaded'; |
$cache->{$name.':lastDownloadTime'}='Not downloaded'; |
$cache->{$name.':updateTime'}=' Not updated'; |
$cache->{$name.':updateTime'}=' Not updated'; |
Line 798 sub TestCacheData {
|
Line 797 sub TestCacheData {
|
while($tieTries < $totalDelay) { |
while($tieTries < $totalDelay) { |
my $result=0; |
my $result=0; |
if($isCached) { |
if($isCached) { |
$result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_READER,0640); |
$result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_READER(),0640); |
} else { |
} else { |
$result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_NEWDB,0640); |
$result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_NEWDB(),0640); |
} |
} |
if($result) { |
if($result) { |
last; |
last; |