--- loncom/interface/lonmenu.pm 2024/01/01 00:53:49 1.545 +++ loncom/interface/lonmenu.pm 2024/10/14 02:13:26 1.557 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.545 2024/01/01 00:53:49 raeburn Exp $ +# $Id: lonmenu.pm,v 1.557 2024/10/14 02:13:26 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]}); } @@ -909,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 ''; } @@ -1234,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 # @@ -1243,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=(< + ENDSERVERFORM } @@ -3054,7 +3114,7 @@ sub roles_selector { $js = &jump_to_role($cdom,$cnum,\%seccount,\%courseroles,\%courseprivs, \%roledesc,$privref,$menucoll,$menuref); $form = - '
'."\n". + ''."\n". ' '."\n". ' '."\n". @@ -3064,7 +3124,8 @@ sub roles_selector { $form .= ' '."\n"; } - $form .= '
'."\n"; + $form .= ''."\n". + ''."\n"; foreach my $role (@roles_order) { my $include; if (defined($courseroles{$role})) { @@ -3553,7 +3614,7 @@ $donebutton $collapse - + $expand $alttxt$title