[LON-CAPA-cvs] cvs: loncom /interface lonhelper.pm
foxr
lon-capa-cvs@mail.lon-capa.org
Tue, 22 Feb 2005 22:56:08 -0000
foxr Tue Feb 22 17:56:08 2005 EDT
Modified files:
/loncom/interface lonhelper.pm
Log:
Fix up the regexp matching for remembering <resource> option values.
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.98 loncom/interface/lonhelper.pm:1.99
--- loncom/interface/lonhelper.pm:1.98 Tue Feb 22 06:43:05 2005
+++ loncom/interface/lonhelper.pm Tue Feb 22 17:56:08 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.98 2005/02/22 11:43:05 foxr Exp $
+# $Id: lonhelper.pm,v 1.99 2005/02/22 22:56:08 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2011,8 +2011,10 @@
HTML::Entities::encode($raw_name,"<>&\"'");
if($option_vars) {
foreach my $option_var (@$option_vars) {
+ my $var_value = "\|\|\|" . $helper->{VARS}->{$option_var} .
+ "\|\|\|";
my $checked ="";
- if($helper->{VARS}->{$option_var} =~ /$raw_name/) {
+ if($var_value =~ /\Q|||$raw_name|||\E/) {
$checked = "checked";
}
$col .=