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

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 17 Feb 2004 19:56:30 -0000


matthew		Tue Feb 17 14:56:30 2004 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  When calling dbh->quote() on the submissions before insert, we have to
  remember to unquote on retrieval.  This was messing up problem analysis.
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.116 loncom/interface/loncoursedata.pm:1.117
--- loncom/interface/loncoursedata.pm:1.116	Fri Feb  6 14:35:00 2004
+++ loncom/interface/loncoursedata.pm	Tue Feb 17 14:56:30 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursedata.pm,v 1.116 2004/02/06 19:35:00 matthew Exp $
+# $Id: loncoursedata.pm,v 1.117 2004/02/17 19:56:30 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2107,6 +2107,10 @@
     }
     my $dataset = $sth->fetchall_arrayref();
     if (ref($dataset) eq 'ARRAY' && scalar(@$dataset)>0) {
+        # Clear the \'s from around the submission
+        for (my $i =0;$i<scalar(@$dataset);$i++) {
+            $dataset->[$i]->[3] =~ s/(\'$|^\')//g;
+        }
         return $dataset;
     }
 }