--- loncom/xml/lonxml.pm 2024/03/31 02:02:32 1.531.2.24.2.3
+++ 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.3 2024/03/31 02:02:32 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,14 +1798,62 @@ 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";