--- loncom/interface/lonhtmlcommon.pm 2003/02/19 20:13:45 1.12
+++ loncom/interface/lonhtmlcommon.pm 2003/03/03 22:00:03 1.15
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.12 2003/02/19 20:13:45 matthew Exp $
+# $Id: lonhtmlcommon.pm,v 1.15 2003/03/03 22:00:03 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -524,7 +524,7 @@ sub Title {
=pod
-=item &CreateTableHeadings()
+=item &CreateHeadings()
This function generates the column headings for the chart.
@@ -640,33 +640,56 @@ sub FormatStudentInformation {
# Create progress
sub Create_PrgWin {
- my ($r, $title, $heading)=@_;
+ my ($r, $title, $heading, $number_to_do)=@_;
$r->print('");
+ my %prog_state;
+ $prog_state{'now'}=0;
+ $prog_state{'since'}=time;
+ $prog_state{'started'}=time;
+ $prog_state{'total'}=$number_to_do;
+
$r->rflush();
+ return %prog_state;
}
# update progress
sub Update_PrgWin {
- my ($displayString,$r)=@_;
+ my ($r,$prog_state,$displayString)=@_;
$r->print('');
+ $$prog_state{'started'}=time;
+ $r->rflush();
+}
+
+# increment progress state
+sub Increment_PrgWin {
+ my ($r,$prog_state,$extraInfo)=@_;
+ $$prog_state{'now'}++;
+ $r->print('');
+ $$prog_state{'started'}=time;
$r->rflush();
}
# close Progress Line
sub Close_PrgWin {
- my ($r)=@_;
+ my ($r,$prog_state)=@_;
$r->print(''."\n");
+ undef(%$prog_state);
$r->rflush();
}