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

raeburn raeburn@source.lon-capa.org
Sat, 26 Feb 2011 12:54:52 -0000


raeburn		Sat Feb 26 12:54:52 2011 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Fix regular expression used to replace null with comma when displaying
    vector in computer's answer in submission record (stringresponse).
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1000 loncom/interface/loncommon.pm:1.1001
--- loncom/interface/loncommon.pm:1.1000	Mon Feb  7 18:12:35 2011
+++ loncom/interface/loncommon.pm	Sat Feb 26 12:54:52 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1000 2011/02/07 18:12:35 www Exp $
+# $Id: loncommon.pm,v 1.1001 2011/02/26 12:54:52 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3564,8 +3564,8 @@
         my @anskeys = sort(keys(%answers));
         if (@anskeys == 1) {
             my $answer = $answers{$anskeys[0]};
-            if ($answer =~ m{\Q\0\E}) {
-                $answer =~ s{\Q\0\E}{, }g;
+            if ($answer =~ m{\0}) {
+                $answer =~ s{\0}{,}g;
             }
             my $tag_internal_answer_name = 'INTERNAL';
             if ($anskeys[0] eq $tag_internal_answer_name) {
@@ -3576,8 +3576,8 @@
         } else {
             foreach my $ans (@anskeys) {
                 my $answer = $answers{$ans};
-                if ($answer =~ m{\Q\0\E}) {
-                    $answer =~ s{\Q\0\E}{, }g;
+                if ($answer =~ m{\0}) {
+                    $answer =~ s{\0}{,}g;
                 }
                 $value .=  $ans.'='.$answer.'<br />';;
             }