[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstudentassessment.pm

matthew lon-capa-cvs@mail.lon-capa.org
Wed, 03 Sep 2003 18:23:10 -0000


matthew		Wed Sep  3 14:23:10 2003 EDT

  Modified files:              
    /loncom/interface/statistics	lonstudentassessment.pm 
  Log:
  More paranoia about uninitialized variables in package.
  
  
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.65 loncom/interface/statistics/lonstudentassessment.pm:1.66
--- loncom/interface/statistics/lonstudentassessment.pm:1.65	Wed Sep  3 13:45:49 2003
+++ loncom/interface/statistics/lonstudentassessment.pm	Wed Sep  3 14:23:10 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentassessment.pm,v 1.65 2003/09/03 17:45:49 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.66 2003/09/03 18:23:10 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -140,6 +140,12 @@
     my ($r,$c)=@_;
 
     undef($Statistics);
+    undef($show_links);
+    undef($output_mode);
+    undef($data);
+    undef($base);
+    undef($datadescription);
+    undef($single_student_mode);
 
     $single_student_mode = 0;
     $single_student_mode = 1 if ($ENV{'form.SelectedStudent'});
@@ -585,6 +591,7 @@
     $padding = ' 'x3;
     $count = 0;
     $nodata_count = 0;
+    undef(%prog_state);
     #
     $r->print("<h3>".$ENV{'course.'.$ENV{'request.course.id'}.'.description'}.
               "&nbsp;&nbsp;".localtime(time)."</h3>");
@@ -836,7 +843,14 @@
 sub excel_initialize {
     my ($r) = @_;
     #
-    $request_aborted = undef;
+    undef ($excel_sheet);
+    undef ($excel_workbook);
+    undef ($filename);
+    undef ($rows_output);
+    undef ($cols_output);
+    undef (%prog_state);
+    undef ($request_aborted);
+    #
     my $total_columns = scalar(&get_student_fields_to_show());
     foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) {
         # Add 2 because we need a 'sum' and 'total' column for each
@@ -1173,8 +1187,9 @@
     my ($r) = @_;
     # 
     # Clean up
-    $filename = undef;
-    $outputfile = undef;
+    undef($outputfile);
+    undef($filename);
+    undef($request_aborted);
     undef(%prog_state);
     #
     # Deal with unimplemented requests