--- loncom/interface/lonmenu.pm 2009/08/13 14:01:37 1.244.2.4
+++ loncom/interface/lonmenu.pm 2010/01/18 20:28:20 1.244.2.8
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.244.2.4 2009/08/13 14:01:37 raeburn Exp $
+# $Id: lonmenu.pm,v 1.244.2.8 2010/01/18 20:28:20 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -144,6 +144,7 @@ use Apache::loncommon();
use Apache::lonenc();
use Apache::lonlocal;
use LONCAPA qw(:DEFAULT :match);
+use HTML::Entities();
use vars qw(@desklines %category_names %category_members %category_positions $readdesk);
@@ -1028,9 +1029,9 @@ sub open {
($env{'environment.remote'} eq 'off')) {
return
'';
}
my $menuname = &get_menu_name();
@@ -1193,7 +1194,6 @@ sub inlinemenu {
}
foreach my $item (sort(keys(%active))) {
$output.=$inlineremote[$item];
- &Apache::lonnet::logthis("item=$item output=$inlineremote[$item]");
}
$output.='';
$output.='';
@@ -1354,7 +1354,8 @@ sub rawconfig {
sub check_for_rcrs {
my $showreqcrs = 0;
- foreach my $type ('official','unofficial','community') {
+ my @reqtypes = ('official','unofficial','community');
+ foreach my $type (@reqtypes) {
if (&Apache::lonnet::usertools_access($env{'user.name'},
$env{'user.domain'},
$type,undef,'requestcourses')) {
@@ -1362,6 +1363,14 @@ sub check_for_rcrs {
last;
}
}
+ if (!$showreqcrs) {
+ foreach my $type (@reqtypes) {
+ if ($env{'environment.reqcrsotherdom.'.$type} ne '') {
+ $showreqcrs = 1;
+ last;
+ }
+ }
+ }
return $showreqcrs;
}
@@ -1721,7 +1730,7 @@ sub roles_selector {
}
$role_selector .= ''."\n".
''."\n".
+ &HTML::Entities::encode($ENV{'REQUEST_URI'},'"<>&').'" />'."\n".
''."\n".
''."\n".
''."\n".