--- loncom/interface/statistics/lonproblemstatistics.pm 2002/08/05 18:10:08 1.12 +++ loncom/interface/statistics/lonproblemstatistics.pm 2002/08/12 18:21:42 1.18 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: lonproblemstatistics.pm,v 1.12 2002/08/05 18:10:08 minaeibi Exp $ +# $Id: lonproblemstatistics.pm,v 1.18 2002/08/12 18:21:42 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -47,8 +47,8 @@ use GDBM_File; sub BuildProblemStatisticsPage { my ($cacheDB, $students, $courseID, $c, $r)=@_; my %cache; - #my %DoDiff; - unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { + + unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { return '
Unable to tie database.'; } @@ -70,21 +70,27 @@ sub BuildProblemStatisticsPage { $Ptr .= ''; $Ptr .= &ProblemStatisticsLegend(); $r->print($Ptr); + $r->rflush(); untie(%cache); + &Create_PrgWin($r); + my $count=0; foreach (@$students) { + &Update_PrgWin(scalar(@$students),$count,$_,$r); my $courseData = &Apache::loncoursedata::DownloadCourseInformation($_, $courseID); last if ($c->aborted()); - if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT,0640)) { + if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) { &Apache::loncoursedata::ProcessStudentData(\%cache, $courseData, $_); untie(%cache); } + $count++; } + &Close_PrgWin($r); if($c->aborted()) { return; } - unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { + unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { return 'Unable to tie database.'; } @@ -95,12 +101,6 @@ sub BuildProblemStatisticsPage { my $state=$ENV{'form.ProblemStatisticsHeading'}; -# my $state=&Apache::lonstatistics::CheckFormElement(\%cache, -# 'ProblemStatisticsHeading', -# 'ProblemStatisticsHeading', -# 'Homework Sets Order'); - $r->print("P# | '."\n"; for(my $nIndex=0; $nIndex < (scalar (keys %$headings)); $nIndex++) { $Result .= ''.''+
+ 'Computation Progress'+ + ''+ + ' |
---|