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

matthew lon-capa-cvs@mail.lon-capa.org
Fri, 06 Feb 2004 19:35:00 -0000


matthew		Fri Feb  6 14:35:00 2004 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  Clean up do-it-yourself quoting.
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.115 loncom/interface/loncoursedata.pm:1.116
--- loncom/interface/loncoursedata.pm:1.115	Tue Feb  3 15:44:06 2004
+++ loncom/interface/loncoursedata.pm	Fri Feb  6 14:35:00 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursedata.pm,v 1.115 2004/02/03 20:44:06 matthew Exp $
+# $Id: loncoursedata.pm,v 1.116 2004/02/06 19:35:00 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1235,11 +1235,7 @@
                     # However, there is one wrinkle: submissions which end in
                     # and odd number of '\' cause insert errors to occur.  
                     # Best trap this somehow...
-                    $value =~ s/\'/\\\'/g;
-                    my ($offensive_string) = ($value =~ /(\\+)$/);
-                    if (length($offensive_string) % 2) {
-                        $value =~ s/\\$/\\\\/;
-                    }
+                    $value = $dbh->quote($value);
                 }
                 if ($field eq 'submissiongrading' || 
                     $field eq 'molecule') {
@@ -2168,7 +2164,7 @@
 
 =pod
 
-=item &get_student_scores($Students,$Symbs,$enrollment,$courseid)
+=item &get_student_scores($Sections,$Symbs,$enrollment,$courseid)
 
 =cut