--- loncom/xml/lonxml.pm 2024/03/31 02:02:32 1.531.2.24.2.3 +++ loncom/xml/lonxml.pm 2024/09/25 00:42:37 1.531.2.24.2.6 @@ -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.6 2024/09/25 00:42:37 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1734,12 +1734,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 +1797,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";