[LON-CAPA-cvs] cvs: loncom /homework optionresponse.pm /xml lonxml.pm
foxr
foxr at source.lon-capa.org
Fri Nov 30 06:45:57 EST 2012
foxr Fri Nov 30 11:45:57 2012 EDT
Modified files:
/loncom/homework optionresponse.pm
/loncom/xml lonxml.pm
Log:
BZ 6626 - Don't strip variable optinos for foilgroups.
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.187 loncom/homework/optionresponse.pm:1.188
--- loncom/homework/optionresponse.pm:1.187 Fri Oct 12 12:45:46 2012
+++ loncom/homework/optionresponse.pm Fri Nov 30 11:45:50 2012
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.187 2012/10/12 12:45:46 raeburn Exp $
+# $Id: optionresponse.pm,v 1.188 2012/11/30 11:45:50 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -108,7 +108,11 @@
my $optionlist="<option></option>\n";
my $option;
my @opt;
- eval '@opt ='. &Apache::lonxml::get_param('options',$parstack,$safeeval);
+ my @raw_options = &Apache::lonxml::get_param('options', $parstack, $safeeval, 0, 0, 1);
+
+
+ eval '@opt ='. &Apache::lonxml::get_param('options',$parstack,$safeeval, 0, 0, 1);
+
my $count=1;
foreach $option (@opt) {
$optionlist.="<option value=\"$count\">$option</option>\n";
@@ -148,7 +152,10 @@
if ($target eq 'modified') {
my @options;
my $optchanged=0;
- eval '@options ='.&Apache::lonxml::get_param('options',$parstack,$safeeval);
+
+
+ eval '@options ='.&Apache::lonxml::get_param('options',$parstack,$safeeval, 0, 0, 1);
+
if ($env{"form.$Apache::lonxml::curdepth.deleteopt"}) {
my $delopt=$env{"form.$Apache::lonxml::curdepth.deleteopt"};
&Apache::lonxml::debug("Deleting :$delopt:");
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.534 loncom/xml/lonxml.pm:1.535
--- loncom/xml/lonxml.pm:1.534 Thu Nov 29 20:47:11 2012
+++ loncom/xml/lonxml.pm Fri Nov 30 11:45:57 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.534 2012/11/29 20:47:11 raeburn Exp $
+# $Id: lonxml.pm,v 1.535 2012/11/30 11:45:57 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2050,16 +2050,25 @@
}
sub get_param {
- my ($param,$parstack,$safeeval,$context,$case_insensitive) = @_;
+ my ($param,$parstack,$safeeval,$context,$case_insensitive, $noelide) = @_;
+
if ( ! $context ) { $context = -1; }
my $args ='';
if ( $#$parstack > (-2-$context) ) { $args=$$parstack[$context]; }
if ( ! $Apache::lonxml::usestyle ) {
$args=$Apache::lonxml::style_values.$args;
}
+
+
+ if ($noelide) {
+# $args =~ s/\\'/'/g;
+ $args =~ s/'\$/'\\\$/g;
+ }
+
if ( ! $args ) { return undef; }
if ( $case_insensitive ) {
if ($args =~ s/(my (?:.*))(\$\Q$param\E[,\)])/$1.lc($2)/ei) {
+
return &Apache::run::run("{$args;".'return $'.$param.'}',
$safeeval); #'
} else {
@@ -2067,6 +2076,7 @@
}
} else {
if ( $args =~ /my .*\$\Q$param\E[,\)]/ ) {
+
return &Apache::run::run("{$args;".'return $'.$param.'}',
$safeeval); #'
} else {
More information about the LON-CAPA-cvs
mailing list