--- loncom/interface/statistics/lonstudentassessment.pm 2002/07/31 14:35:38 1.5 +++ loncom/interface/statistics/lonstudentassessment.pm 2002/08/05 20:53:38 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: lonstudentassessment.pm,v 1.5 2002/07/31 14:35:38 stredwic Exp $ +# $Id: lonstudentassessment.pm,v 1.7 2002/08/05 20:53:38 stredwic Exp $ # # Copyright Michigan State University Board of Trustees # @@ -49,7 +49,7 @@ sub BuildStudentAssessmentPage { $studentInformation,$r,$c)=@_; # $jr = $r; my %cache; - unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { + unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { $r->print('
Unable to tie database.'); return; } @@ -86,6 +86,7 @@ sub BuildStudentAssessmentPage { $students); $r->print(&CreateInterface(\%cache, $selectedName, $students, $formName, $doNotShow)); + $r->rflush(); my $Str = ''; if($selectedName eq 'No Student Selected') { @@ -98,10 +99,12 @@ sub BuildStudentAssessmentPage { $r->print(&CreateTableHeadings(\%cache, $spacing, $infoKeys, $infoHeadings, $sequenceKeys, $sequenceHeadings)); untie(%cache); + if($c->aborted()) { return $Str; } my $selected=0; $r->print(''."\n"); foreach (@$students) { + if($c->aborted()) { return $Str; } next if ($_ ne $selectedName && $selectedName ne 'All Students'); $selected = 1; @@ -116,7 +119,6 @@ sub BuildStudentAssessmentPage { &Apache::loncoursedata::DownloadCourseInformation($_, $courseID); unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) { - last if($c->aborted()); next; } &Apache::loncoursedata::ProcessStudentData(\%cache, @@ -124,9 +126,9 @@ sub BuildStudentAssessmentPage { untie(%cache); } - last if ($c->aborted()); + next if($c->aborted()); - if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { + if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { my $displayString = 'DISPLAYDATA'.$spacing; $r->print(&Apache::lonhtmlcommon::FormatStudentInformation( \%cache, $_, @@ -135,6 +137,7 @@ sub BuildStudentAssessmentPage { 'preformatted')); $r->print(&StudentReport(\%cache, $_, $spacing, $sequenceKeys)); $r->print("\n"); + $r->rflush(); untie(%cache); } }