--- loncom/interface/lonmenu.pm 2023/12/29 19:53:25 1.369.2.83.2.13 +++ loncom/interface/lonmenu.pm 2024/02/26 00:28:19 1.369.2.83.2.17 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.83.2.13 2023/12/29 19:53:25 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.83.2.17 2024/02/26 00:28:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -370,15 +370,15 @@ sub primary_menu { ($item->[2] eq 'blog')) && (!&Apache::lonnet::usertools_access('','',$item->[2], undef,'tools'))); - if ($item->[2] eq 'browsepub') { + if (($item->[2] eq 'browsepub') && ($item->[0] eq '/res/')) { if ($env{'request.role'} =~ /^au\./) { - $item->[0] = '/res/'.$env{'request.role.domain'}.'/?launch=1'; - } elsif ($env{'request.role'} =~ /^ca\./($match_domain)/($match_user)$/) { - $item->[0] = '/res/'.$1.'/'.$2.'/?launch=1'; + $item->[0] .= $env{'request.role.domain'}.'/?launch=1'; + } elsif ($env{'request.role'} =~ m{^ca\./($match_domain)/($match_username)$}) { + $item->[0] .= $1.'/'.$2.'/?launch=1'; } elsif (&Apache::lonnet::allowed('bre',$env{'user.domain'})) { - $item->[0] = '/res/'.$env{'user.domain'}.'/?launch=1'; + $item->[0] .= $env{'user.domain'}.'/?launch=1'; } elsif (&Apache::lonnet::allowed('bro','/res/')) { - $item->[0] = '/res/?launch=1'; + $item->[0] .= '?launch=1'; } else { next; } @@ -1331,6 +1331,7 @@ s&2&1&back.png&&&gopost('/adm/flip','bac s&2&3&forw.png&&&gopost('/adm/flip','forward:'+currentURL)&Next content resource&&3"; } $menuitems .= (<'; $inlineremote[$idx] = ''. - $pic.''.$top.' '.$form; + $pic.''.$top.' '; } # Remote $img=~s/\.png$/\.gif/; @@ -2208,7 +2209,7 @@ sub switch { } else { $inlineremote[$idx] = ''.$pic. - ''.$top.' '; + ''.$top.' '.$form; } } return '';