--- loncom/interface/lonmenu.pm 2024/05/01 22:08:11 1.551 +++ 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.551 2024/05/01 22:08:11 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' @@ -1261,6 +1265,14 @@ s&7&4&docs-22x22.png&Edit Metadata&defau s&7&2&prt.png&Print&printout[_1]&gocstr('/adm/printout','$esc_currdir')&Print contents of directory 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'}) && + ($uname eq $env{'user.name'}) && ($udom eq $env{'user.domain'})) { + $menuitems .= (<<ENDMENUITEMS); +s&7&7&archive.png&Export&dir[_1]&gocstr('/adm/cfile?action=archive','$esc_currdir')&Export Authoring Space Archive +ENDMENUITEMS + } + } } else { $currdir =~ s|[^/]+$||; my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn); @@ -1896,7 +1908,7 @@ sub advtools_crumbs { } elsif ($env{'request.noversionuri'} !~ m{^/adm/(navmaps|viewclasslist)(\?|$)}) { if ($env{'request.state'} eq 'construct') { &Apache::lonhtmlcommon::add_breadcrumb_tool( - 'advtools', @funcs[61,73,74,71,72]); + 'advtools', @funcs[61,73,74,71,72,77]); } else { &Apache::lonhtmlcommon::add_breadcrumb_tool( 'advtools', @funcs[61,71,72,73,74,75,92]); @@ -2679,6 +2691,7 @@ sub utilityfunctions { my $esc_url=&escape($currenturl); my $esc_symb=&escape($currentsymb); my $newname = &mt('New Name'); + &js_escape(\$newname); my $countdown = &countdown_toggle_js(); @@ -2687,7 +2700,7 @@ sub utilityfunctions { ($env{'request.symb'} ne '') && ($env{'request.filename'}=~/$LONCAPA::assess_re/)) { my $canview; - foreach my $priv ('msg','vgr') { + foreach my $priv ('mgr','vgr') { $canview = &Apache::lonnet::allowed($priv,$env{'request.course.id'}); if (!$canview && $env{'request.course.sec'} ne '') { $canview = @@ -2933,12 +2946,14 @@ sub serverform { if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self')) { $target = ' target="_self"'; } + my $submit = &mt('Submit'); return(<<ENDSERVERFORM); -<form name="server" action="/adm/logout" method="post"$target> +<form name="server" action="/adm/logout" method="post"$target aria-hidden="true"> <input type="hidden" name="postdata" value="none" /> <input type="hidden" name="command" value="none" /> <input type="hidden" name="url" value="none" /> <input type="hidden" name="symb" value="none" /> +<input type="submit" value="$submit" class="LC_visually_hidden" tabindex="-1" disabled="disabled" /> </form> ENDSERVERFORM } @@ -3103,7 +3118,7 @@ sub roles_selector { $js = &jump_to_role($cdom,$cnum,\%seccount,\%courseroles,\%courseprivs, \%roledesc,$privref,$menucoll,$menuref); $form = - '<form name="rolechooser" method="post" action="'.$httphost.'/adm/roles"'.$targetattr.'>'."\n". + '<form name="rolechooser" method="post" action="'.$httphost.'/adm/roles"'.$targetattr.' aria-hidden="true">'."\n". ' <input type="hidden" name="destinationurl" value="'. &HTML::Entities::encode($destinationurl).'" />'."\n". ' <input type="hidden" name="gotorole" value="1" />'."\n". @@ -3113,7 +3128,8 @@ sub roles_selector { $form .= ' <input type="hidden" name="destsymb" value="'. &HTML::Entities::encode($destsymb).'" />'."\n"; } - $form .= '</form>'."\n"; + $form .= '<input type="submit" value="'.&mt('Submit').'" class="LC_visually_hidden" tabindex="-1" disabled="disabled" />'."\n". + '</form>'."\n"; foreach my $role (@roles_order) { my $include; if (defined($courseroles{$role})) { @@ -3602,7 +3618,7 @@ $donebutton <span id="ddcountcollapse" class="LC_menubuttons_inline_text"> $collapse </span></a> -<span id="duedatecountdown" class="LC_menubuttons_inline_text" style="display: $currdisp;"></span> +<span id="duedatecountdown" class="LC_menubuttons_inline_text" style="display: $currdisp;" role="timer"></span> <a href="javascript:toggleCountdown();" class="LC_menubuttons_link"> <span id="ddcountexpand" class="LC_menubuttons_inline_text" >$expand</span> <img src="/res/adm/pages/timer.png" title="$desc" class="LC_icon" alt="$alttxt" /><span class="LC_menubuttons_inline_text">$title</span></a>