--- loncom/interface/lonmenu.pm 2009/08/13 13:28:51 1.244.2.2
+++ loncom/interface/lonmenu.pm 2009/06/08 18:04:45 1.270
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.244.2.2 2009/08/13 13:28:51 raeburn Exp $
+# $Id: lonmenu.pm,v 1.270 2009/06/08 18:04:45 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -26,15 +26,10 @@
# http://www.lon-capa.org/
#
#
-# There are two parameters controlling the action of this module:
-#
-# browser.interface - if this is 'textual', it overrides the second parameter
-# and goes to screen reader PDA mode
+# There is one parameter controlling the action of this module:
#
# environment.remote - if this is 'on', the routines controll the remote
-# control, otherwise they render the main window controls; ignored it
-# browser.interface is 'textual'
-#
+# control, otherwise they render the main window controls;
=head1 NAME
@@ -51,8 +46,6 @@ described at http://www.lon-capa.org.
=over
-=item show_course()
-
Little texts
=item initlittle()
@@ -150,22 +143,6 @@ use vars qw(@desklines %category_names %
my @inlineremote;
-
-
-sub show_course {
- my $course = !$env{'user.adv'};
- if (!$env{'user.adv'}) {
- foreach my $env (keys(%env)) {
- next if ($env !~ m/^user\.priv\./);
- if ($env !~ m/^user\.priv\.(?:st|cm)/) {
- $course = 0;
- last;
- }
- }
- }
- return $course;
-}
-
sub initlittle {
return &Apache::lonlocal::texthash('ret' => 'Return to Last Location',
'nav' => 'Navigate Contents',
@@ -206,8 +183,8 @@ sub menubuttons {
my $escsymb=&escape(&Apache::lonenc::check_encrypt($env{'request.symb'}));
my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif");
- $logo = '
 | ';
+ $logo = '
';
if ($env{'request.state'} eq 'construct') {
if (($env{'request.noversionuri'} eq '') || (!defined($env{'request.noversionuri'}))) {
@@ -234,75 +211,32 @@ sub menubuttons {
}
}
- if ($env{'browser.interface'} eq 'textual') {
-# Textual display only
- if ($env{'request.course.id'}) {
- $navmaps=(<$lt{'nav'}
-ENDNAV
- if (&show_return_link()) {
- my $escreload=&escape('return:');
- $reloadlink=(<$lt{'ret'}
-ENDRELOAD
- }
- if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
- $docs=(<$lt{'docs'}
-ENDDOCS
- }
- if ($showgroups) {
- $groups =(<$lt{'groups'}
-ENDGROUPS
- }
- }
- my $form=&serverform();
- my $utility=&utilityfunctions();
- my $output=(<
-// BEGIN LON-CAPA Internal
-$utility
-
-
-
-
-$form
-ENDMAINMENU
- if ($registration) { $output.=&innerregister($forcereg); }
- return $output."
";
- } elsif ($env{'environment.remote'} eq 'off') {
+ if ($env{'environment.remote'} eq 'off') {
# Remote Control is switched off
# figure out colors
- my %lt=&initlittle();
+ my %lt=&initlittle();
my $domain=&Apache::loncommon::determinedomain();
- my $function =&Apache::loncommon::get_users_function();
+ my $function =&Apache::loncommon::get_users_function();
my $link=&Apache::loncommon::designparm($function.'.link',$domain);
my $alink=&Apache::loncommon::designparm($function.'.alink',$domain);
my $vlink=&Apache::loncommon::designparm($function.'.vlink',$domain);
my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain);
- if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') {
- return (<
- $logo
+ $logo |
|
$lt{'login'}
|
-
ENDINLINEMENU
}
- $roles = ''.$lt{'roles'}.' | ';
+ $roles = ''.$lt{'roles'}.'';
# Do we have a NAV link?
if ($env{'request.course.id'}) {
my $link='/adm/navmaps?postdata='.$escurl.'&postsymb='.
@@ -311,34 +245,35 @@ ENDINLINEMENU
$link="javascript:gonav('".$link."')";
}
$navmaps=(<$lt{'nav'}
+$lt{'nav'}
ENDNAV
my $is_group = (&Apache::loncommon::course_type() eq 'Group');
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
my $text = ($is_group) ? $lt{'gdoc'} : $lt{'docs'};
$docs=(<$text
+$text
ENDDOCS
}
if ($showgroups) {
$groups =(<$lt{'groups'}
+$lt{'groups'}
ENDGROUPS
}
if (&show_return_link()) {
my $escreload=&escape('return:');
$reloadlink=(<$lt{'ret'}
+$lt{'ret'}
ENDRELOAD
}
if ($role_selector) {
- $roles = ''.$role_selector.' | '.$lt{'other'}.' | ';
+ #$roles = ''.$role_selector.' | '.$lt{'other'}.' | ';
+ $role_selector = ''.$role_selector.'';
}
}
if (($env{'request.state'} eq 'construct') && ($env{'request.course.id'})) {
my $escreload=&escape('return:');
$reloadlink=(<$lt{'ret'}
+$lt{'ret'}
ENDCRELOAD
}
my $reg='';
@@ -348,6 +283,12 @@ ENDCRELOAD
my $form=&serverform();
my $utility=&utilityfunctions();
+ my $messagelink = "";
+ if(&Apache::lonmsg::mynewmail()){
+ $messagelink = 'Message(new)'
+ }else{
+ $messagelink = 'Message'
+ }
my $helplink=&Apache::loncommon::top_nav_help('Help');
return (<
@@ -356,19 +297,21 @@ ENDCRELOAD
$utility
// ]]>
-
+$role_selector
+
$form
$timesync
+$breadcrumb
$tablestart
$inlinebuttons
$tableend
@@ -791,9 +727,9 @@ ENDREGTHIS
# =============================================================================
} else {
# ========================================== This can or will not be registered
- if ($textual) {
-# Not registered, textual
- $result= (<');
}
#
@@ -959,8 +894,7 @@ ENDSETFLAGS
}
sub maincall() {
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
return(<
main();
@@ -971,13 +905,12 @@ ENDMAINCALL
sub load_remote_msg {
my ($lowerurl)=@_;
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
my $esclowerurl=&escape($lowerurl);
- my $link=&mt('[_1]Continue[_2] on in Inline Menu mode',
- '',
- '');
+ my $link=&mt('[_1]Continue[_2] on in Inline Menu mode'
+ ,''
+ ,'');
return(<