--- loncom/interface/lonmenu.pm 2024/05/21 02:57:16 1.554 +++ loncom/interface/lonmenu.pm 2025/01/07 22:21:56 1.560 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.554 2024/05/21 02:57:16 raeburn Exp $ +# $Id: lonmenu.pm,v 1.560 2025/01/07 22:21:56 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -615,6 +615,10 @@ sub secondary_menu { && !$env{'request.course.id'}; next if $$menuitem[4] =~ /^crsedit/ && (!$canedit && !$canvieweditor); + next if $$menuitem[4] eq 'crseditCourse' + && ($crstype eq 'Community'); + next if $$menuitem[4] eq 'crseditCommunity' + && ($crstype ne 'Community'); next if $$menuitem[4] eq 'nvgr' && ($canvgr || $ltiexc{'grades'}); next if $$menuitem[4] eq 'vgr' @@ -1262,7 +1266,8 @@ s&7&2&prt.png&Print&printout[_1]&gocstr( s&7&1&del.png&Delete&dir[_3]&gocstr('/adm/cfile?action=delete','$esc_currdir')&Delete this Directory ENDMENUITEMS unless ($crsauthor_cstr) { - if ($env{'environment.canarchive'}) { + if (($env{'environment.canarchive'}) && + ($uname eq $env{'user.name'}) && ($udom eq $env{'user.domain'})) { $menuitems .= (< + ENDSERVERFORM } @@ -3110,7 +3118,7 @@ sub roles_selector { $js = &jump_to_role($cdom,$cnum,\%seccount,\%courseroles,\%courseprivs, \%roledesc,$privref,$menucoll,$menuref); $form = - '
'."\n". + ''."\n". ' '."\n". ' '."\n". @@ -3120,7 +3128,8 @@ sub roles_selector { $form .= ' '."\n"; } - $form .= '
'."\n"; + $form .= ''."\n". + ''."\n"; foreach my $role (@roles_order) { my $include; if (defined($courseroles{$role})) { @@ -3609,7 +3618,7 @@ $donebutton $collapse - + $expand $alttxt$title