--- loncom/interface/spreadsheet/classcalc.pm	2003/10/14 18:36:54	1.14
+++ loncom/interface/spreadsheet/classcalc.pm	2003/11/17 19:55:41	1.15
@@ -1,5 +1,5 @@
 #
-# $Id: classcalc.pm,v 1.14 2003/10/14 18:36:54 www Exp $
+# $Id: classcalc.pm,v 1.15 2003/11/17 19:55:41 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -117,6 +117,10 @@ sub parent_link {
 sub outsheet_html {
     my $self = shift;
     my ($r) = @_;
+    ####################################
+    # Report any calculation errors    #
+    ####################################
+    $r->print($self->html_report_error());
     ###################################
     # Determine table structure
     ###################################
@@ -247,7 +251,6 @@ sub csv_rows {
     my ($connection,$filehandle) = @_;
     #
     # Write a header row
-
     $self->csv_output_row($filehandle,undef,
                    (&mt('Fullname'),&mt('Username'),&mt('Domain'),&mt('Section'),&mt('Status'),&mt('ID')));
     #
@@ -270,7 +273,7 @@ sub csv_rows {
 sub outsheet_recursive_excel {
     my $self = shift;
     my ($r) = @_;
-} 
+}
 
 sub compute {
     my $self = shift;
@@ -295,6 +298,10 @@ sub compute {
 	    ($student->{'username'},$student->{'domain'},undef);
         if ($connection->aborted()) { $self->cleanup(); return; }
 	my @exportdata = $studentsheet->export_data($r);
+        if ($studentsheet->badcalc()) {
+            $self->set_calcerror($sname.' : '.
+                                 $studentsheet->calcerror());
+        }
         if ($connection->aborted()) { $self->cleanup(); return; }
 	my $rownum = $self->get_row_number_from_key($sname);
         $f{'A'.$rownum} = $sname;