--- loncom/interface/lonmenu.pm 2024/04/19 03:48:22 1.549 +++ loncom/interface/lonmenu.pm 2024/05/01 14:42:54 1.550 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.549 2024/04/19 03:48:22 raeburn Exp $ +# $Id: lonmenu.pm,v 1.550 2024/05/01 14:42:54 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -910,7 +910,6 @@ 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 ''; } @@ -1236,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 # @@ -1245,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=(<