[LON-CAPA-cvs] cvs: loncom /interface/spreadsheet assesscalc.pm studentcalc.pm

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 12 Jun 2003 21:17:12 -0000


matthew		Thu Jun 12 17:17:12 2003 EDT

  Modified files:              
    /loncom/interface/spreadsheet	assesscalc.pm studentcalc.pm 
  Log:
  Handle course data caching properly.
  
  
Index: loncom/interface/spreadsheet/assesscalc.pm
diff -u loncom/interface/spreadsheet/assesscalc.pm:1.12 loncom/interface/spreadsheet/assesscalc.pm:1.13
--- loncom/interface/spreadsheet/assesscalc.pm:1.12	Thu May 29 14:31:27 2003
+++ loncom/interface/spreadsheet/assesscalc.pm	Thu Jun 12 17:17:11 2003
@@ -1,5 +1,5 @@
 #
-# $Id: assesscalc.pm,v 1.12 2003/05/29 18:31:27 matthew Exp $
+# $Id: assesscalc.pm,v 1.13 2003/06/12 21:17:11 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -140,10 +140,12 @@
 ########################################################
 sub initialize_package {
     my ($sname,$sdomain) = @_;
-    $current_course = $ENV{'request.course.id'};
     $current_name   = $sname;
     $current_domain = $sdomain;
-    undef(%courseopt);
+    if ($current_course ne $ENV{'request.course.id'}) {
+        $current_course = $ENV{'request.course.id'};
+        undef(%courseopt);
+    }
     &load_cached_export_rows();
     &load_parameter_caches();
 }
@@ -509,7 +511,7 @@
 
 sub compute {
     my $self = shift;
-    $self->logthis('computing');
+#    $self->logthis('computing');
     $self->initialize_safe_space();
     #########################################
     #########################################
Index: loncom/interface/spreadsheet/studentcalc.pm
diff -u loncom/interface/spreadsheet/studentcalc.pm:1.10 loncom/interface/spreadsheet/studentcalc.pm:1.11
--- loncom/interface/spreadsheet/studentcalc.pm:1.10	Thu May 29 14:39:58 2003
+++ loncom/interface/spreadsheet/studentcalc.pm	Thu Jun 12 17:17:11 2003
@@ -1,5 +1,5 @@
 #
-# $Id: studentcalc.pm,v 1.10 2003/05/29 18:39:58 matthew Exp $
+# $Id: studentcalc.pm,v 1.11 2003/06/12 21:17:11 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -65,6 +65,7 @@
 my $current_course;
 
 sub initialize {
+    &Apache::assesscalc::initialize();
     &initialize_sequence_cache();
 }