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

www lon-capa-cvs@mail.lon-capa.org
Mon, 21 Feb 2005 00:32:04 -0000


www		Sun Feb 20 19:32:04 2005 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  "Logout" and "Roles/Courses" in inline menu.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.148 loncom/interface/lonmenu.pm:1.149
--- loncom/interface/lonmenu.pm:1.148	Fri Feb 18 16:23:12 2005
+++ loncom/interface/lonmenu.pm	Sun Feb 20 19:32:04 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.148 2005/02/18 21:23:12 albertel Exp $
+# $Id: lonmenu.pm,v 1.149 2005/02/21 00:32:04 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -60,6 +60,9 @@
     return &Apache::lonlocal::texthash('ret' => 'Return to Last Location',
 				       'nav' => 'Navigate Contents',
 				       'main' => 'Main Menu',
+                                       'roles' => ($ENV{'user.adv'}?
+                                                    'Roles':'Courses'),
+                                       'exit' => 'Exit',
 				       'launch' => 'Launch Remote Control');
 }
 
@@ -72,7 +75,8 @@
     my $titletable=shift;
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
 					    ['inhibitmenu']);
-    if ($ENV{'form.inhibitmenu'} eq 'yes') { return ''; }
+    if (($ENV{'form.inhibitmenu'} eq 'yes') ||
+        ($ENV{'REQUEST_URI'} eq '/adm/logout')) { return ''; }
 
     my $navmaps='';
     my $reloadlink='';
@@ -103,7 +107,7 @@
 <a href="/adm/flip?postdata=$escreload" target="_top"><font color="$font">$lt{'ret'}</font></a>
 ENDRELOAD
             }
-        }
+	}
         my $form=&serverform();
         my $utility=&utilityfunctions();
 	my $output=(<<ENDMAINMENU);
@@ -113,7 +117,10 @@
 -->
 </script>
 <a href="/adm/menu" target="_top">$lt{'main'}</a>
-$reloadlink $navmaps<br />
+$reloadlink $navmaps
+<a href="/adm/roles" target="_top"><font color="$font">$lt{'roles'}</font></a>
+<a href="/adm/logout" target="_top"><font color="$font">$lt{'exit'}</font></a>
+<br />
 <script type="text/javascript">
 // END LON-CAPA Internal
 </script>
@@ -196,6 +203,12 @@
 <a href="/adm/remote?action=launch&amp;url=$escurl" target="_top">
 <font color="$font">$lt{'launch'}</font></a></td>
 <td bgcolor="$tabbg">
+<a href="/adm/roles" target="_top"><font color="$font">$lt{'roles'}</font></a>
+</td>
+<td bgcolor="$tabbg">
+<a href="/adm/logout" target="_top"><font color="$font">$lt{'exit'}</font></a>
+</td>
+<td bgcolor="$tabbg">
 <img align="right" src="$logo" />
 <b>LON-CAPA</b></td>
 $form