Diff for /loncom/interface/spreadsheet/classcalc.pm between versions 1.10.2.1 and 1.12

version 1.10.2.1, 2003/12/05 22:24:20 version 1.12, 2003/09/05 01:57:54
Line 46  classcalc Line 46  classcalc
 package Apache::classcalc;  package Apache::classcalc;
   
 use strict;  use strict;
   use warnings FATAL=>'all';
   no warnings 'uninitialized';
 use Apache::Constants qw(:common :http);  use Apache::Constants qw(:common :http);
 use Apache::loncoursedata();  use Apache::loncoursedata();
 use Apache::lonhtmlcommon();  use Apache::lonhtmlcommon();
Line 71  sub initialize { Line 73  sub initialize {
     return;      return;
 }  }
   
   sub clear_package {
       undef(@Students);
       &Apache::studentcalc::clear_package();
   }
   
 sub html_header {  sub html_header {
     my $self = shift;      my $self = shift;
     my ($toprow,$bottomrow);      my ($toprow,$bottomrow);
Line 109  sub parent_link { Line 116  sub parent_link {
 sub outsheet_html {  sub outsheet_html {
     my $self = shift;      my $self = shift;
     my ($r) = @_;      my ($r) = @_;
     ####################################  
     # Report any calculation errors    #  
     ####################################  
     $r->print($self->html_report_error());  
     ###################################      ###################################
     # Determine table structure      # Determine table structure
     ###################################      ###################################
Line 259  sub outsheet_recursive_excel { Line 262  sub outsheet_recursive_excel {
 sub compute {  sub compute {
     my $self = shift;      my $self = shift;
     my ($r) = @_;      my ($r) = @_;
       my $connection = $r->connection();
       if ($connection->aborted()) { $self->cleanup(); return; }
     $self->initialize_safe_space();      $self->initialize_safe_space();
     my %c = $self->constants();      my %c = $self->constants();
     my %f = $self->formulas();      my %f = $self->formulas();
Line 271  sub compute { Line 276  sub compute {
     &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,      &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,
                                           'Processing first student');                                            'Processing first student');
     foreach my $student (@Students) {      foreach my $student (@Students) {
           if ($connection->aborted()) { $self->cleanup(); return; }
         my $sname = $student->{'username'}.':'.$student->{'domain'};          my $sname = $student->{'username'}.':'.$student->{'domain'};
  my $studentsheet = Apache::studentcalc->new   my $studentsheet = Apache::studentcalc->new
     ($student->{'username'},$student->{'domain'},undef);      ($student->{'username'},$student->{'domain'},undef);
  my @exportdata = $studentsheet->export_data();          if ($connection->aborted()) { $self->cleanup(); return; }
         if ($studentsheet->badcalc()) {   my @exportdata = $studentsheet->export_data($r);
             $self->set_calcerror($sname.' : '.          if ($connection->aborted()) { $self->cleanup(); return; }
                                  $studentsheet->calcerror());  
         }  
  my $rownum = $self->get_row_number_from_key($sname);   my $rownum = $self->get_row_number_from_key($sname);
         $f{'A'.$rownum} = $sname;          $f{'A'.$rownum} = $sname;
         $self->{'row_source'}->{$rownum} = $sname;          $self->{'row_source'}->{$rownum} = $sname;

Removed from v.1.10.2.1  
changed lines
  Added in v.1.12


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>