--- loncom/xml/lonxml.pm 2003/04/11 16:03:26 1.248 +++ loncom/xml/lonxml.pm 2003/05/16 18:34:56 1.252 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.248 2003/04/11 16:03:26 albertel Exp $ +# $Id: lonxml.pm,v 1.252 2003/05/16 18:34:56 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -560,9 +560,10 @@ sub inner_xmlparse { } } if (($token->[0] eq 'T') || ($token->[0] eq 'C') || ($token->[0] eq 'D') ) { - if ($target eq 'tex') { - $result=&latex_special_symbols($result,$stack,$parstack); - } + #Style file definitions should be correct + if ($target eq 'tex' && ($Apache::lonxml::usestyle)) { + $result=&latex_special_symbols($result,$stack,$parstack); + } } # Encode any high ASCII characters @@ -721,6 +722,7 @@ sub init_safespace { $safeeval->permit("sort"); $safeeval->deny(":base_io"); $safehole->wrap(\&Apache::scripttag::xmlparse,$safeeval,'&xmlparse'); + $safehole->wrap(\&Apache::outputtags::multipart,$safeeval,'&multipart'); $safehole->wrap(\&Apache::lonnet::EXT,$safeeval,'&EXT'); $safehole->wrap(\&Math::Cephes::asin,$safeeval,'&asin'); @@ -802,6 +804,7 @@ sub init_safespace { my ($symb,$courseid,$domain,$name) = &Apache::lonxml::whichuser(); $rndseed=&Apache::lonnet::rndseed($symb,$courseid,$domain,$name); $safeinit .= ';$external::randomseed='.$rndseed.';'; + &Apache::lonxml::debug("Setting rndseed to $rndseed"); &Apache::run::run($safeinit,$safeeval); } @@ -1249,6 +1252,18 @@ ENDNOTFOUND writeallows($request->uri); + # If we're editing, show the filename of the resource in the frame's main + # title + if ($ENV{'form.editmode'}) { + my $filename = $request->uri; + # Everything after the last / + $filename = substr($filename, rindex($filename, '/') + 1); + $result = substr($result, 0, rindex($result, '')); + $result .= ""; + $result .= "\n\n"; + } + + $request->print($result); return OK;