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

matthew lon-capa-cvs@mail.lon-capa.org
Fri, 14 Feb 2003 21:45:19 -0000


matthew		Fri Feb 14 16:45:19 2003 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  &get_current_state() now uses DIFFERENT keys to store different information
  instead of using THE SAME KEY EVERY TIME it stores anything for a student.
  Most errors seem to be caused by something between my chair and my keyboard.
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.47 loncom/interface/loncoursedata.pm:1.48
--- loncom/interface/loncoursedata.pm:1.47	Fri Feb 14 16:02:05 2003
+++ loncom/interface/loncoursedata.pm	Fri Feb 14 16:45:19 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # (Publication Handler
 #
-# $Id: loncoursedata.pm,v 1.47 2003/02/14 21:02:05 matthew Exp $
+# $Id: loncoursedata.pm,v 1.48 2003/02/14 21:45:19 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1611,13 +1611,13 @@
                 my $value = join(':',map { &Apache::lonnet::escape($_); } 
                                  @Parameters);
                 # Store away the values
-                $cache{$key.&Apache::lonnet::escape($symb)}=$value;
+                $cache{$key.&Apache::lonnet::escape($current_symb)}=$value;
             }
             $cache{$key.'time'}=$time_of_retrieval;
             untie(%cache);
         }
     } else {
-#        &Apache::lonnet::logthis('retrieving cached data ');
+        &Apache::lonnet::logthis('retrieving cached data ');
         if (tie(%cache,'GDBM_File',$cachefilename,&GDBM_READER(),0640)) {
             if (defined($symb)) {
                 my  $searchkey = $key.&Apache::lonnet::escape($symb);
@@ -1628,7 +1628,10 @@
                 my $searchkey = '^'.$key.'(.*)$';#'
                 while (my ($testkey,$params)=each(%cache)) {
                     if ($testkey =~ /$searchkey/) { # \Q \E?  May be necc.
-                        $student_data{&Apache::lonnet::unescape($1)} = 
+                        my $tmpsymb = $1;
+                        next if ($tmpsymb =~ 'time');
+#                        &Apache::lonnet::logthis('found '.$tmpsymb.':');
+                        $student_data{&Apache::lonnet::unescape($tmpsymb)} = 
                             &make_into_hash($params);
                     }
                 }