--- loncom/xml/lonxml.pm 2012/11/29 20:47:11 1.534 +++ loncom/xml/lonxml.pm 2012/11/30 11:45:57 1.535 @@ -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 add_messages { } 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 @@ sub get_param { } } else { if ( $args =~ /my .*\$\Q$param\E[,\)]/ ) { + return &Apache::run::run("{$args;".'return $'.$param.'}', $safeeval); #' } else {