--- loncom/interface/lonmenu.pm 2005/02/08 00:01:32 1.145
+++ loncom/interface/lonmenu.pm 2005/02/26 06:14:01 1.150
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.145 2005/02/08 00:01:32 albertel Exp $
+# $Id: lonmenu.pm,v 1.150 2005/02/26 06:14:01 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -60,6 +60,9 @@ sub initlittle {
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 @@ sub menubuttons {
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 @@ ENDNAV
$lt{'ret'}
ENDRELOAD
}
- }
+ }
my $form=&serverform();
my $utility=&utilityfunctions();
my $output=(<
$lt{'main'}
-$reloadlink $navmaps
+$reloadlink $navmaps
+$lt{'roles'}
+$lt{'exit'}
+
@@ -177,10 +184,13 @@ ENDRELOAD
}
my $form=&serverform();
my $utility=&utilityfunctions();
+ my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif");
return (<
// BEGIN LON-CAPA Internal
+//
@@ -193,7 +203,13 @@ $navmaps
$lt{'launch'}
-
+$lt{'roles'}
+ |
+
+$lt{'exit'}
+ |
+
+
LON-CAPA |
$form
@@ -293,9 +309,10 @@ sub innerregister {
}
if ($ENV{'request.state'} eq 'construct') {
$newmail = $titletable;
- }
- if ($noremote) {
- $newmail.='
';
+ } else {
+ if ($noremote) {
+ $newmail.='';
+ }
}
my $timesync=($textual?'':'swmenu.syncclock(1000*'.time.');');
my $tablestart=($noremote?'':'').($textinter?'
'.&mt('Skip to Content').'
':'');
@@ -440,27 +457,27 @@ ENDREALRES
$buttons.=&clear(@rest);
}
}
- my $addremote=0;
- foreach (@inlineremote) { if ($_ ne '') { $addremote=1; } }
- if ($textual && $addremote) {
-# Registered, textual output
+
+ if ($textual) {
+ my $addremote=0;
+ foreach (@inlineremote) { if ($_ ne '') { $addremote=1; } }
my $inlinebuttons='';
+ if ($addremote) {
+# Registered, textual output
- if ($ENV{'browser.interface'} eq 'textual') {
- $inlinebuttons=
+ if ($ENV{'browser.interface'} eq 'textual') {
+ $inlinebuttons=
join('',map { (defined($_)?$_:'') } @inlineremote);
- } else {
- $inlinebuttons=(<$inlineremote[21] | | $inlineremote[23] |
$inlineremote[61] | $inlineremote[62] | $inlineremote[63] |
$inlineremote[71] | $inlineremote[72] | $inlineremote[73] |
$inlineremote[81] | $inlineremote[82] | $inlineremote[83] |
$inlineremote[91] | $inlineremote[92] | $inlineremote[93] |
ENDINLINE
+ }
}
- if ($const_space && $is_const_dir) {
- $inlinebuttons = '';
- }
$result =(<
// BEGIN LON-CAPA Internal
@@ -482,6 +499,7 @@ ENDREGTEXT
my $cursymb=&Apache::lonenc::check_encrypt($ENV{'request.symb'});
my $navstatus=&get_nav_status();
my $clearcstr;
+
if ($ENV{'user.adv'}) { $clearcstr='clearbut(6,1)'; }
$result = (<
ENDREGTHIS
}
@@ -1173,8 +1191,10 @@ ENDSCRIPT
$ENV{'browser.interface'}='faketextual';
$ENV{'environment.remote'}='off';
}
+ my $html=&Apache::lonxml::xmlbegin();
$r->print(<
+$html
+
LON-CAPA Main Menu
$script_tag