[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm

raeburn raeburn at source.lon-capa.org
Tue Aug 6 10:44:36 EDT 2019


raeburn		Tue Aug  6 14:44:36 2019 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - User's active groups in course available from $env{'request.course.groups'}
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.496 loncom/interface/lonmenu.pm:1.497
--- loncom/interface/lonmenu.pm:1.496	Tue Jan  8 23:40:16 2019
+++ loncom/interface/lonmenu.pm	Tue Aug  6 14:44:36 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.496 2019/01/08 23:40:16 raeburn Exp $
+# $Id: lonmenu.pm,v 1.497 2019/08/06 14:44:36 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -448,10 +448,8 @@
                 $showresv = 1;
             }
         }
-        my %groups = &Apache::lonnet::get_active_groups(
-                     $env{'user.domain'}, $env{'user.name'},$cdom,$cnum);
-        if (%groups) {
-            foreach my $group (keys(%groups)) {
+        if ($env{'request.course.groups'} ne '') {
+            foreach my $group (split(/:/,$env{'request.course.groups'}) {
                 my @privs = split(/:/,$env{"user.priv.$env{'request.role'}./$cdom/$cnum/$group"});
                 shift(@privs);
                 if (@privs) {




More information about the LON-CAPA-cvs mailing list