[LON-CAPA-cvs] cvs: loncom /homework grades.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 27 Nov 2002 15:25:48 -0000


albertel		Wed Nov 27 10:25:48 2002 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - BUG #1005
  - need to match exactly
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.59 loncom/homework/grades.pm:1.60
--- loncom/homework/grades.pm:1.59	Fri Nov 22 13:55:18 2002
+++ loncom/homework/grades.pm	Wed Nov 27 10:25:48 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.59 2002/11/22 18:55:18 albertel Exp $
+# $Id: grades.pm,v 1.60 2002/11/27 15:25:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1199,7 +1199,7 @@
     (my $styleoff = $styleon) =~ s/\</\<\//;
     my @keylist   = split(/[,\s+]/,$ENV{'form.keywords'});
     foreach (@keylist) {
-	$string =~ s/\b$_(\b|\.)/\<font color\=$ENV{'form.kwclr'} $size\>$styleon$_$styleoff\<\/font\>/gi;
+	$string =~ s/\b\Q$_\E(\b|\.)/\<font color\=$ENV{'form.kwclr'} $size\>$styleon$_$styleoff\<\/font\>/gi;
     }
     # This is not really the right place to do this, but I cannot find a
     # better one at this time.  So here we go - the m in the s:::mg causes