--- loncom/interface/lonmenu.pm 2023/12/29 19:53:25 1.369.2.83.2.13
+++ loncom/interface/lonmenu.pm 2024/01/02 14:14:47 1.369.2.83.2.16
@@ -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.16 2024/01/02 14:14:47 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;
}
@@ -2158,7 +2158,7 @@ sub switch {
'" align="'.($nobreak==3?'right':'left').'" class="LC_icon" />';
$inlineremote[$idx] =
''.$form;
+ $pic.'';
}
# Remote
$img=~s/\.png$/\.gif/;
@@ -2208,7 +2208,7 @@ sub switch {
} else {
$inlineremote[$idx] =
'';
+ ''.$form;
}
}
return '';