--- loncom/xml/lonxml.pm 2024/02/28 18:33:00 1.531.2.24.2.2 +++ loncom/xml/lonxml.pm 2025/01/15 18:09:02 1.531.2.24.2.7 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.531.2.24.2.2 2024/02/28 18:33:00 raeburn Exp $ +# $Id: lonxml.pm,v 1.531.2.24.2.7 2025/01/15 18:09:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -768,6 +768,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"); @@ -1734,12 +1735,12 @@ FULLPAGE $onclick{$item} = 'onclick="is_submit=true;setmode(this.form,'."'$item'".')"'; } unless ($uri =~ m{^/uploaded/}) { - $undo = ''."\n"; } $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"; @@ -1797,15 +1798,67 @@ ENDSCRIPT } sub seteditor_javascript { + my ($is_course_doc,$is_supp,$supp_path,$supp_title) = @_; + my $symb; + if ($is_course_doc) { + if (!$is_supp) { + ($symb) = &Apache::lonnet::whichuser(); + if ($symb) { + $symb = &escape($symb); + } + } + } return <<"ENDSCRIPT";