[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Tue, 18 Jul 2006 19:45:16 -0000
raeburn Tue Jul 18 15:45:16 2006 EDT
Modified files:
/loncom/interface lonmenu.pm
Log:
Restoring groups link to inline nav. Correct allowed check for roles with section specification.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.196 loncom/interface/lonmenu.pm:1.197
--- loncom/interface/lonmenu.pm:1.196 Fri Jul 14 15:49:46 2006
+++ loncom/interface/lonmenu.pm Tue Jul 18 15:45:15 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.196 2006/07/14 19:49:46 www Exp $
+# $Id: lonmenu.pm,v 1.197 2006/07/18 19:45:15 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -65,7 +65,6 @@
'launch' => 'Launch Remote Control',
'groups' => 'Groups',
'gdoc' => 'Group Documents',
- 'teams' => 'Teams',
);
}
@@ -101,7 +100,7 @@
if ($env{'request.course.id'}) {
my %coursegroups;
my $viewgrps_permission =
- &Apache::lonnet::allowed('vcg',$env{'request.course.id'});
+ &Apache::lonnet::allowed('vcg',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''));
if (!$viewgrps_permission) {
%coursegroups = &Apache::lonnet::get_active_groups($env{'user.domain'},$env{'user.name'},$env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'});
}
@@ -129,11 +128,11 @@
<a href="/adm/coursedocs" target="_top">$lt{'docs'}</a>
ENDDOCS
}
-# if ($showgroups) {
-# $groups =(<<ENDGROUPS);
-#<a href="/adm/coursegroups" target="_top">$lt{'groups'}</a>
-#ENDGROUPS
-# }
+ if ($showgroups) {
+ $groups =(<<ENDGROUPS);
+<a href="/adm/coursegroups" target="_top">$lt{'groups'}</a>
+ENDGROUPS
+ }
}
my $form=&serverform();
my $utility=&utilityfunctions();
@@ -198,12 +197,11 @@
<td><a href="/adm/coursedocs" target="_top">$text</a></td>
ENDDOCS
}
-# if ($showgroups) {
-# my $text = ($is_group) ? $lt{'teams'} : $lt{'groups'};
-# $groups =(<<ENDGROUPS);
-#<td><a href="/adm/coursegroups" target="_top">$text</a></td>
-#ENDGROUPS
-# }
+ if ($showgroups) {
+ $groups =(<<ENDGROUPS);
+<td><a href="/adm/coursegroups" target="_top">$lt{'groups'}</a></td>
+ENDGROUPS
+ }
if (
($env{'request.noversionuri'}=~m[^/(res|public)/] &&
$env{'request.symb'} eq '')