--- loncom/xml/lonxml.pm 2024/08/18 21:57:10 1.531.2.24.2.4 +++ loncom/xml/lonxml.pm 2024/07/04 15:50:20 1.531.2.25 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.531.2.24.2.4 2024/08/18 21:57:10 raeburn Exp $ +# $Id: lonxml.pm,v 1.531.2.25 2024/07/04 15:50:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1708,9 +1708,8 @@ FULLPAGE my %lt=&Apache::lonlocal::texthash('st' => 'Save and Edit', 'vi' => 'Save and View', 'dv' => 'Discard Edits and View', - 'un' => 'Undo', - 'ed' => 'Edit', - 'ew' => 'Edit with Daxe'); + 'un' => 'undo', + 'ed' => 'Edit'); my $spelllink = &Apache::lonhtmlcommon::spelllink('xmledit','filecont'); my $textarea_events = &Apache::edit::element_change_detection(); my $form_events = &Apache::edit::form_change_detection(); @@ -1726,25 +1725,18 @@ FULLPAGE } } } - my ($undo,$daxebutton,%onclick); - foreach my $item ('discard','undo','daxe') { + my ($undo,%onclick); + foreach my $item ('discard','undo') { $onclick{$item} = 'onclick="still_ask=true;setmode(this.form,'."'$item'".')"'; } foreach my $item ('saveedit','saveview') { $onclick{$item} = 'onclick="is_submit=true;setmode(this.form,'."'$item'".')"'; } unless ($uri =~ m{^/uploaded/}) { - $undo = ''."\n"; + $undo = ''."\n"; } $initialize .= &setmode_javascript(); - if ($filetype eq 'html') { - my %editors = &Apache::loncommon::permitted_editors(); - if ($editors{'daxe'}) { - $daxebutton = ''."\n"; - } - } my $editfooter=(< @@ -1763,7 +1755,7 @@ $initialize
- $undo $deps_button $daxebutton $dragmath_button $htmlerror + $undo $deps_button $dragmath_button $htmlerror

$spelllink @@ -1776,48 +1768,6 @@ ENDFOOTER return ($editfooter,$add_to_onload,$add_to_onresize); } -sub setmode_javascript { - return <<"ENDSCRIPT"; - -ENDSCRIPT -} - -sub seteditor_javascript { - return <<"ENDSCRIPT"; - -ENDSCRIPT -} - sub get_target { my $viewgrades=&Apache::lonnet::allowed('vgr',$env{'request.course.id'}); if ( $env{'request.state'} eq 'published') { @@ -1967,7 +1917,7 @@ ENDNOTFOUND &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['editmode']); } - if ((!$env{'form.editmode'}) || + if ((!$env{'form.editmode'}) || ($env{'form.problemmode'} eq 'saveview') || ($env{'form.problemmode'} eq 'discard')) { if ($filetype eq 'html' || $filetype eq 'sty') { @@ -2037,7 +1987,7 @@ ENDNOTFOUND # Edit action? Insert editing commands # unless (($env{'request.state'} eq 'published') || ($inhibit_menu)) { - if (($env{'form.editmode'}) && + if (($env{'form.editmode'}) && (!($env{'form.problemmode'} eq 'saveview')) && (!($env{'form.problemmode'} eq 'discard'))) { my ($displayfile,$url,$symb,$itemtitle,$action);