--- loncom/xml/lonxml.pm 2012/11/29 20:47:11 1.534 +++ loncom/xml/lonxml.pm 2012/12/07 17:16:01 1.537 @@ -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.537 2012/12/07 17:16:01 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1670,6 +1670,11 @@ sub handler { } else { $filetype='html'; } + unless ($env{'request.uri'}) { + $env{'request.uri'}=$request->uri; + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, + ['todocs']); + } if ($filetype eq 'sty') { $breadcrumbtext = 'Style File Editor'; } elsif ($filetype eq 'js') { @@ -2050,16 +2055,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 +2081,7 @@ sub get_param { } } else { if ( $args =~ /my .*\$\Q$param\E[,\)]/ ) { + return &Apache::run::run("{$args;".'return $'.$param.'}', $safeeval); #' } else {