--- loncom/xml/lonxml.pm 2024/07/08 01:01:44 1.573 +++ loncom/xml/lonxml.pm 2025/02/19 23:39:38 1.577 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.573 2024/07/08 01:01:44 raeburn Exp $ +# $Id: lonxml.pm,v 1.577 2025/02/19 23:39:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -673,6 +673,7 @@ sub init_safespace { $safeeval->reval('use LONCAPA::LCMathComplex;'); $safeeval->permit_only(":default"); $safeeval->permit("entereval"); + $safeeval->permit("hintseval"); $safeeval->permit(":base_math"); $safeeval->permit("sort"); $safeeval->permit("time"); @@ -1615,7 +1616,8 @@ FULLPAGE 'dv' => 'Discard Edits and View', 'un' => 'Undo', 'ed' => 'Edit', - 'ew' => 'Edit with Daxe'); + 'ew' => 'Edit with Daxe', + 'er' => 'Editor'); my $spelllink = &Apache::lonhtmlcommon::spelllink('xmledit','filecont'); my $textarea_events = &Apache::edit::element_change_detection(); my $form_events = &Apache::edit::form_change_detection(); @@ -1644,7 +1646,7 @@ FULLPAGE } $initialize .= &setmode_javascript(); if ($filetype eq 'html') { - my %editors = &Apache::loncommon::permitted_editors(); + my %editors = &Apache::loncommon::permitted_editors($uri); if ($editors{'daxe'}) { $daxebutton = ''."\n"; @@ -1671,7 +1673,7 @@ $initialize $undo $deps_button $daxebutton $dragmath_button $htmlerror -
$spelllink +
$spelllink

$titledisplay @@ -1888,12 +1890,19 @@ sub handler { my $result = ''; my $filecontents=&Apache::lonnet::getfile($file); if ($filecontents eq -1) { - my $start_page=&Apache::loncommon::start_page('File Error'); - my $end_page=&Apache::loncommon::end_page(); - my $errormsg='

' - .&mt('File not found: [_1]' - ,''.$file.'') - .'

'; + my ($start_page,$end_page,$errormsg); + $start_page=&Apache::loncommon::start_page('File Error'); + if ($target eq 'web') { + $start_page .= ''; + } + $end_page .= &Apache::loncommon::end_page(); + $errormsg='

' + .&mt('File not found: [_1]' + ,''.$file.'') + .'

'; $result=(<