--- loncom/xml/lonxml.pm 2006/09/19 18:17:18 1.418 +++ loncom/xml/lonxml.pm 2006/09/29 20:36:45 1.420 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.418 2006/09/19 18:17:18 albertel Exp $ +# $Id: lonxml.pm,v 1.420 2006/09/29 20:36:45 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -772,8 +772,11 @@ sub init_safespace { $safehole->wrap(\&Math::Random::random_set_seed,$safeeval,'&random_set_seed'); $safehole->wrap(\&Apache::lonxml::error,$safeeval,'&LONCAPA_INTERNAL_ERROR'); $safehole->wrap(\&Apache::lonxml::debug,$safeeval,'&LONCAPA_INTERNAL_DEBUG'); + $safehole->wrap(\&Apache::lonnet::logthis,$safeeval,'&LONCAPA_INTERNAL_LOGTHIS'); + $safehole->wrap(\&Apache::inputtags::finalizeawards,$safeeval,'&LONCAPA_INTERNAL_FINALIZEAWARDS'); $safehole->wrap(\&Apache::caparesponse::get_sigrange,$safeeval,'&LONCAPA_INTERNAL_get_sigrange'); - + use Data::Dumper; + $safehole->wrap(\&Data::Dumper::Dumper,$safeeval,'&Dumper'); #need to inspect this class of ops # $safeeval->deny(":base_orig"); $safeeval->permit("require"); @@ -1654,10 +1657,10 @@ sub get_param_var { } &Apache::lonxml::debug("Args are $args param is $param"); if ($case_insensitive) { - if (! ($args=~s/(my \$)(\Q$param\E)(=\")/$1.lc($2).$3/ei)) { + if (! ($args=~s/(my (?:.*))(\$\Q$param\E[,\)])/$1.lc($2)/ei)) { return undef; } - } elsif ( $args !~ /my \$\Q$param\E=\"/ ) { return undef; } + } elsif ( $args !~ /my .*\$\Q$param\E[,\)]/ ) { return undef; } my $value=&Apache::run::run("{$args;".'return $'.$param.'}',$safeeval); #' &Apache::lonxml::debug("first run is $value"); if ($value =~ /^[\$\@\%][a-zA-Z_]\w*$/) {