--- loncom/interface/spreadsheet/classcalc.pm 2006/08/18 15:15:39 1.28
+++ loncom/interface/spreadsheet/classcalc.pm 2014/02/12 16:53:09 1.32
@@ -1,5 +1,5 @@
#
-# $Id: classcalc.pm,v 1.28 2006/08/18 15:15:39 raeburn Exp $
+# $Id: classcalc.pm,v 1.32 2014/02/12 16:53:09 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -91,15 +91,10 @@ sub html_header {
$toprow .= '
'.&mt($name).' | ';
$bottomrow .= ''.$selector.' | ';
}
- my $status .= ''.&mt('Status: [_1]',
- ''
- ).'';
-
return "\n
\n".
"".$toprow."
\n".
"".$bottomrow."
\n".
- "
\n".$status."\n".
+ "\n".
"";
}
@@ -321,13 +316,13 @@ sub outsheet_htmlclasslist {
#
if ($show_expire_link) {
$r->print(''.
+ 'recalc=expireallsheets¬_first_run=1">'.
&mt('Expire all student spreadsheets').''.$/);
}
#
- $r->print(''.
+ $r->print('
'.
&mt('Click on a student to be taken to their spreadsheet').
- '');
+ '
');
#
my %header=&Apache::lonlocal::texthash(
'student' => 'Student',
@@ -362,7 +357,7 @@ END
$r->print("\n".$tableheader);
}
my $link = '';
+ '&sdomain='.$student->{'domain'}.'">';
$student->{'section'} = 'none' if ($student->{'section'} eq '-1');
$r->print(''.
''.$num_output.' | '.
@@ -375,9 +370,9 @@ END
if ($show_expire_link) {
$r->print(''.
'Expire Record'.$/);
+ $student->{'username'}.':'.$student->{'domain'}.'&'.
+ 'output_format=htmlclasslist&'.
+ 'not_first_run=1'.'">'.&mt('Expire Record').''.$/);
}
$r->print(" |
\n");
}
@@ -385,16 +380,6 @@ END
return;
}
-sub update_status {
- my ($r,$message) = @_;
- $r->print('');
- $r->rflush();
- return;
-}
-
sub compute {
my $self = shift;
my ($r) = @_;
@@ -403,14 +388,9 @@ sub compute {
$self->initialize_safe_space();
my %c = $self->constants();
my %f = $self->formulas();
- &update_status($r,'Initializing Course Structure');
&Apache::studentcalc::initialize_package();
- my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin
- ($r,&mt('Spreadsheet Computation Status'),
- &mt('Spreadsheet Computation'), scalar(@Students),'inline',undef,
- 'sheet','spreadsheet_status');
- &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,
- &mt('Processing first student'));
+ my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,scalar(@Students));
+ &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Processing first student'));
foreach my $student (@Students) {
if ($connection->aborted()) { $self->cleanup(); return; }
my $sname = $student->{'username'}.':'.$student->{'domain'};
@@ -436,17 +416,14 @@ sub compute {
$c{$cell} = $data;
}
}
- &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,
- 'last student');
+ &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,'last student');
}
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
- &update_status($r,'Done computing student sheets');
$r->rflush();
$self->constants(\%c);
$self->formulas(\%f);
$self->calcsheet();
$self->save() if ($self->need_to_save());
- &update_status($r,'Done!');
}
1;