version 1.12, 2002/08/05 18:10:08
|
version 1.13, 2002/08/05 20:53:38
|
Line 70 sub BuildProblemStatisticsPage {
|
Line 70 sub BuildProblemStatisticsPage {
|
$Ptr .= '</table>'; |
$Ptr .= '</table>'; |
$Ptr .= &ProblemStatisticsLegend(); |
$Ptr .= &ProblemStatisticsLegend(); |
$r->print($Ptr); |
$r->print($Ptr); |
|
$r->rflush(); |
|
|
untie(%cache); |
untie(%cache); |
|
&Create_PrgWin($r); |
|
my $count=0; |
foreach (@$students) { |
foreach (@$students) { |
|
&Update_PrgWin(scalar(@$students),$count,$_,$r); |
my $courseData = |
my $courseData = |
&Apache::loncoursedata::DownloadCourseInformation($_, $courseID); |
&Apache::loncoursedata::DownloadCourseInformation($_, $courseID); |
last if ($c->aborted()); |
last if ($c->aborted()); |
Line 81 sub BuildProblemStatisticsPage {
|
Line 85 sub BuildProblemStatisticsPage {
|
$courseData, $_); |
$courseData, $_); |
untie(%cache); |
untie(%cache); |
} |
} |
|
$count++; |
} |
} |
|
&Close_PrgWin($r); |
if($c->aborted()) { return; } |
if($c->aborted()) { return; } |
|
|
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { |
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { |
Line 178 sub CloseTable {
|
Line 184 sub CloseTable {
|
} |
} |
|
|
|
|
|
# Create progress |
|
sub Create_PrgWin { |
|
my ($r)=@_; |
|
$r->print(<<ENDPOP); |
|
<script> |
|
popwin=open('','popwin','width=400,height=100'); |
|
popwin.document.writeln('<html><body bgcolor="#88DDFF">'+ |
|
'<title>LON-CAPA Statistics</title>'+ |
|
'<h4>Computation Progress</h4>'+ |
|
'<form name=popremain>'+ |
|
'<input type=text size=35 name=remaining value=Starting></form>'+ |
|
'</body></html>'); |
|
popwin.document.close(); |
|
</script> |
|
ENDPOP |
|
|
|
$r->rflush(); |
|
} |
|
|
|
# update progress |
|
sub Update_PrgWin { |
|
my ($totalStudents,$index,$name,$r)=@_; |
|
$r->print('<script>popwin.document.popremain.remaining.value="'. |
|
'Computing '.$index.'/'.$totalStudents.': '. |
|
$name.'";</script>'); |
|
$r->rflush(); |
|
} |
|
|
|
# close Progress Line |
|
sub Close_PrgWin { |
|
my ($r)=@_; |
|
$r->print('<script>popwin.close()</script>'); |
|
$r->rflush(); |
|
} |
|
|
# ------ Dump the Student's DB file and handling the data for statistics table |
# ------ Dump the Student's DB file and handling the data for statistics table |
sub ExtractStudentData { |
sub ExtractStudentData { |