--- loncom/xml/lonxml.pm 2010/05/03 14:43:07 1.508 +++ loncom/xml/lonxml.pm 2010/07/26 09:58:53 1.511 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.508 2010/05/03 14:43:07 onken Exp $ +# $Id: lonxml.pm,v 1.511 2010/07/26 09:58:53 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -476,6 +476,10 @@ sub inner_xmlparse { } if (($ENV{'QUERY_STRING'}) && ($target eq 'web')) { $finaloutput=&afterburn($finaloutput); + } + if ($target eq 'modified') { +# if modfied, handle startpart and endpart + $finaloutput=~s/\]*\>(.*)\]*\>/$1<\/part>/gs; } return $finaloutput; } @@ -638,8 +642,9 @@ sub setup_globals { sub init_safespace { my ($target,$safeeval,$safehole,$safeinit) = @_; - $safeeval->deny_only(':dangerous'); $safeeval->reval('use Math::Complex;'); + $safeeval->reval('use LaTeX::Table;'); + $safeeval->deny_only(':dangerous'); $safeeval->permit_only(":default"); $safeeval->permit("entereval"); $safeeval->permit(":base_math"); @@ -1460,7 +1465,7 @@ sub renderingoptions { &Apache::loncommon::select_form( $env{'form.languages'}, 'languages', - &Apache::lonlocal::texthash(%langchoices)). + {&Apache::lonlocal::texthash(%langchoices)}). ''; } $output .= @@ -1469,11 +1474,11 @@ sub renderingoptions { &Apache::loncommon::select_form( $env{'form.texengine'}, 'texengine', - &Apache::lonlocal::texthash + {&Apache::lonlocal::texthash ('' => '', 'tth' => 'tth (TeX to HTML)', 'jsMath' => 'jsMath', - 'mimetex' => 'mimetex (Convert to Images)')). + 'mimetex' => 'mimetex (Convert to Images)')}). ''; return $output; }