--- loncom/interface/loncoursedata.pm 2002/07/30 23:07:10 1.9 +++ loncom/interface/loncoursedata.pm 2002/08/01 20:49:06 1.10 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: loncoursedata.pm,v 1.9 2002/07/30 23:07:10 minaeibi Exp $ +# $Id: loncoursedata.pm,v 1.10 2002/08/01 20:49:06 stredwic Exp $ # # Copyright Michigan State University Board of Trustees # @@ -246,7 +246,7 @@ smoothly. =cut sub ProcessTopResourceMap { - my ($cache,$c)=@_; + my ($cache,$c,$r)=@_; my %hash; my $fn=$ENV{'request.course.fn'}; if(-e "$fn.db") { @@ -255,7 +255,7 @@ sub ProcessTopResourceMap { if($c->aborted()) { return; } - if(tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER,0640)) { + if(tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640)) { last; } $tieTries++; @@ -337,8 +337,6 @@ sub ProcessTopResourceMap { ':'.$currentResourceID; } - $cache->{$currentResourceID.':source'} = - $hash{'src_'.$currentResourceID}; my $meta=$hash{'src_'.$currentResourceID}; # $cache->{$currentResourceID.':title'}= # &Apache::lonnet::metdata($meta,'title'); @@ -531,6 +529,7 @@ sub ProcessClasslist { $cache->{$name.':username'}=$studentName; $cache->{$name.':domain'}=$studentDomain; + # Initialize timestamp for student if(!defined($cache->{$name.':lastDownloadTime'})) { $cache->{$name.':lastDownloadTime'}='Not downloaded'; $cache->{$name.':updateTime'}=' Not updated'; @@ -798,9 +797,9 @@ sub TestCacheData { while($tieTries < $totalDelay) { my $result=0; if($isCached) { - $result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_READER,0640); + $result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_READER(),0640); } else { - $result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_NEWDB,0640); + $result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_NEWDB(),0640); } if($result) { last;