--- loncom/interface/lonmenu.pm 2023/12/28 19:38:17 1.544 +++ loncom/interface/lonmenu.pm 2024/04/19 03:48:22 1.549 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.544 2023/12/28 19:38:17 raeburn Exp $ +# $Id: lonmenu.pm,v 1.549 2024/04/19 03:48:22 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -378,6 +378,7 @@ sub primary_menu { } else { next; } + } if ($env{'request.course.id'} && $menucoll) { next if ($item->[3]) && (!$menuopts{$item->[3]}); } @@ -910,6 +911,7 @@ sub innerregister { $ltiscope,$ltiuri,$showncrumbsref) = @_; my $const_space = ($env{'request.state'} eq 'construct'); my $is_const_dir = 0; + my $in_daxe = 0; if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { return ''; } @@ -1306,6 +1308,35 @@ ENDMENUITEMS s&7&2&prt.png&Print&printout[_1]&gocstr('/adm/printout','/priv/$udom/$uname/$cleandisfn')&Prepare a printable document ENDMENUITEMS } + } +# +# "Exit Daxe" in Functions menu when using Daxe +# + if ((($env{'form.editmode'} eq 'daxe') && + ($thisdisfn=~/\.(xml|html|htm|xhtml|xhtm)$/)) || + (($env{'form.problemmode'} eq 'daxe') && + ($thisdisfn=~/$LONCAPA::assess_re/))) { + my %editors = &Apache::loncommon::permitted_editors(); + if ($editors{'daxe'}) { + my $privfile = &Apache::loncommon::escape_single("/priv/$udom/$uname/$thisdisfn"); + $in_daxe = 1; + $menuitems .= (<