[LON-CAPA-cvs] cvs: loncom /metadata_database parse_activity_log.pl

matthew lon-capa-cvs@mail.lon-capa.org
Wed, 22 Dec 2004 20:42:39 -0000


matthew		Wed Dec 22 15:42:39 2004 EDT

  Modified files:              
    /loncom/metadata_database	parse_activity_log.pl 
  Log:
  Change storage of POST values to escape them and join with '&'.  Also modified
  error logging to use '&' instead of ':' as a delimiter.
  
  
Index: loncom/metadata_database/parse_activity_log.pl
diff -u loncom/metadata_database/parse_activity_log.pl:1.10 loncom/metadata_database/parse_activity_log.pl:1.11
--- loncom/metadata_database/parse_activity_log.pl:1.10	Wed Dec 22 14:25:42 2004
+++ loncom/metadata_database/parse_activity_log.pl	Wed Dec 22 15:42:39 2004
@@ -2,7 +2,7 @@
 #
 # The LearningOnline Network
 #
-# $Id: parse_activity_log.pl,v 1.10 2004/12/22 19:25:42 matthew Exp $
+# $Id: parse_activity_log.pl,v 1.11 2004/12/22 20:42:39 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -480,7 +480,7 @@
                          'uname= '.$uname.$/.
                          'udom = '.$udom.$/.
                          'action='.$action.$/.
-                         '@values = '.join(':',@values));
+                         '@values = '.join('&',@values));
                 next; #skip it if we cannot understand what is happening.
             }
             if (! defined($student) || $student eq ':') {
@@ -524,7 +524,13 @@
                 next; # skip this chunk
             }
             #
-            my $values = $dbh->quote(join(':',map { &escape($_); } @values));
+            my $store_values;
+            if ($action eq 'POST') {
+                $store_values = 
+                    $dbh->quote(join('&',map { &escape($_); } @values));
+            } else {
+                $store_values = $dbh->quote(join('&',@values));
+            }
             $time_this->('get_ids');
             #
             my $row = [$res_id,
@@ -534,7 +540,7 @@
 #                       $action_id,
                        qq{''},        # idx
                        $machine_id,
-                       $values];
+                       $store_values];
             push(@RowData,$row);
             $time_this->('push_row');
             $prevchunk = $chunk;