[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface loncommon.pm

raeburn raeburn@source.lon-capa.org
Tue, 15 Dec 2009 05:08:50 -0000


raeburn		Tue Dec 15 05:08:50 2009 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	loncommon.pm 
  Log:
  - Role selector in standard location for student role in courses in gcitest domain.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.925.2.4 loncom/interface/loncommon.pm:1.925.2.5
--- loncom/interface/loncommon.pm:1.925.2.4	Mon Dec 14 22:40:45 2009
+++ loncom/interface/loncommon.pm	Tue Dec 15 05:08:50 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.925.2.4 2009/12/14 22:40:45 raeburn Exp $
+# $Id: loncommon.pm,v 1.925.2.5 2009/12/15 05:08:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4548,7 +4548,8 @@
 
         my $role_selector;
         if (($custommenu) && ($env{'request.course.id'}) && 
-            ($env{'course.'.$env{'request.course.id'}.'.domain'} eq 'gcitest')) {
+            ($env{'course.'.$env{'request.course.id'}.'.domain'} eq 'gcitest') &&
+            ($env{'request.role'} !~ m{^st\./gcitest/$match_courseid})) {
             $role_selector = &Apache::lonmenu::roles_selector(
                         $env{'course.' . $env{'request.course.id'} . '.domain'},
                         $env{'course.' . $env{'request.course.id'} . '.num'}  );
@@ -4580,7 +4581,8 @@
 
         #don't show menus for public users
         if($env{'user.name'} ne 'public' && $env{'user.domain'} ne 'public'){
-            if ($custommenu) {
+            if (($custommenu) && 
+                ($env{'request.role'} !~ m{^st\./gcitest/$match_courseid})) {
                 $bodytag .= &Apache::lonmenu::gci_secondary_menu();
             } else { 
                 $bodytag .= Apache::lonmenu::secondary_menu();