--- loncom/interface/lonmenu.pm 2024/04/18 17:53:15 1.548 +++ loncom/interface/lonmenu.pm 2024/05/13 13:55:51 1.552 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.548 2024/04/18 17:53:15 raeburn Exp $ +# $Id: lonmenu.pm,v 1.552 2024/05/13 13:55:51 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -910,7 +910,7 @@ sub innerregister { my ($forcereg,$bread_crumbs,$group,$pagebuttonshide,$hostname, $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 ''; } @@ -1235,8 +1235,8 @@ END # End course context # Prepare the rest of the buttons - my ($menuitems,$got_prt,$got_wishlist,$crsauthor); - if ($const_space) { + my ($menuitems,$got_prt,$got_wishlist,$crsauthor,$toplevel_cstr,$crsauthor_cstr); + if ($const_space) { # # We are in construction space # @@ -1244,17 +1244,15 @@ END my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; my ($udom,$uname,$thisdisfn) = ($env{'request.filename'}=~m{^\Q$londocroot/priv/\E([^/]+)/([^/]+)/(.*)$}); - my $crsauthor; if (($env{'request.course.id'}) && ($env{'course.'.$env{'request.course.id'}.'.num'} eq $uname) && ($env{'course.'.$env{'request.course.id'}.'.domain'} eq $udom)) { - $crsauthor = 1; + $crsauthor_cstr = 1; } my $currdir = '/priv/'.$udom.'/'.$uname.'/'.$thisdisfn; if ($currdir =~ m-/$-) { - $is_const_dir = 1; - if (($thisdisfn eq '') && ($crsauthor)) { - $is_const_dir = 2; + if ($thisdisfn eq '') { + $toplevel_cstr = 1; } my $esc_currdir = &Apache::loncommon::escape_single($currdir); $menuitems=(<