--- loncom/interface/Attic/lonspreadsheet.pm 2003/02/13 22:52:48 1.171
+++ loncom/interface/Attic/lonspreadsheet.pm 2003/03/10 20:21:45 1.176
@@ -1,5 +1,5 @@
#
-# $Id: lonspreadsheet.pm,v 1.171 2003/02/13 22:52:48 matthew Exp $
+# $Id: lonspreadsheet.pm,v 1.176 2003/03/10 20:21:45 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -183,10 +183,7 @@ sub handler {
# Header....
#
$r->print('
LON-CAPA Spreadsheet');
- my $nothing = "''";
- if ($ENV{'browser.type'} eq 'explorer') {
- $nothing = "'javascript:void(0);'";
- }
+ my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
if ($ENV{'request.role'} !~ /^st\./) {
$r->print(<{'constants'}})) {
if ($_=~/$varname/) {
$values{$1}=1;
@@ -3185,7 +3201,7 @@ sub loadstudent{
$self->constants(\%constants);
}
-# --------------------------------------------------- Load data for one student
+# --------------------------------------------------- Load Course Sheet
#
sub loadcourse {
my $self = shift;
@@ -3198,20 +3214,12 @@ sub loadcourse {
foreach ($self->rows()) {
$total++ if ($formulas{'A'.$_} !~ /^[!~-]/);
}
- my $now=0;
- my $since=time;
- $r->print(<
- popwin=open('','popwin','width=400,height=100');
- popwin.document.writeln(''+
- 'Spreadsheet Calculation Progress
'+
- ''+
- '');
- popwin.document.close();
-
-ENDPOP
- $r->rflush();
+
+ my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,
+ 'Spreadsheet Status','Spreadsheet Calculation Progress', $total);
+ &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,
+ 'Processing Course Assessment Data');
+
# It would be nice to load in the classlist and assessment info at this
# point, before attacking the student spreadsheets.
foreach my $row ($self->rows()) {
@@ -3225,12 +3233,8 @@ ENDPOP
my @studentdata=$self->exportsheet($sname,$sdom,'studentcalc',
undef,undef,$r);
undef %userrdatas;
- $now++;
- $r->print('');
- $r->rflush();
- #
+ &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,
+ 'last student');
my $index=0;
foreach ('A','B','C','D','E','F','G','H','I','J','K','L','M',
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z') {
@@ -3250,8 +3254,7 @@ ENDPOP
}
$self->formulas(\%formulas);
$self->constants(\%constants);
- $r->print('');
- $r->rflush();
+ &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
}
# ------------------------------------------------ Load data for one assessment