--- loncom/interface/statistics/lonstudentassessment.pm 2002/07/26 19:49:26 1.4 +++ loncom/interface/statistics/lonstudentassessment.pm 2002/07/31 14:35:38 1.5 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: lonstudentassessment.pm,v 1.4 2002/07/26 19:49:26 stredwic Exp $ +# $Id: lonstudentassessment.pm,v 1.5 2002/07/31 14:35:38 stredwic Exp $ # # Copyright Michigan State University Board of Trustees # @@ -106,26 +106,22 @@ sub BuildStudentAssessmentPage { $selectedName ne 'All Students'); $selected = 1; my $courseData; - if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { - if($cache{$_.':lastDownloadTime'} eq 'Not downloaded') { - untie(%cache); - $courseData = - &Apache::loncoursedata::DownloadCourseInformation($_, - $courseID); - if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT,0640)) { - &Apache::loncoursedata::ProcessStudentData(\%cache, - $courseData, $_); - untie(%cache); - } else { - last if($c->aborted()); - next; - } - } else { - untie(%cache); + my $downloadTime=''; + if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { + $downloadTime = $cache{$_.':lastDownloadTime'}; + untie(%cache); + } + if($downloadTime eq 'Not downloaded') { + $courseData = + &Apache::loncoursedata::DownloadCourseInformation($_, + $courseID); + unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) { + last if($c->aborted()); + next; } - } else { - last if($c->aborted()); - next; + &Apache::loncoursedata::ProcessStudentData(\%cache, + $courseData, $_); + untie(%cache); } last if ($c->aborted());