--- loncom/interface/lonmenu.pm 2009/07/13 08:24:21 1.275
+++ loncom/interface/lonmenu.pm 2009/07/21 14:36:08 1.276
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.275 2009/07/13 08:24:21 www Exp $
+# $Id: lonmenu.pm,v 1.276 2009/07/21 14:36:08 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -165,7 +165,6 @@ sub initlittle {
sub menubuttons {
my $forcereg=shift;
- my $registration=shift;
my $titletable=shift;
#
# Early-out for pages that should not have a menu, triggered by query string "inhibitmenu=yes"
@@ -288,20 +287,16 @@ ENDRELOAD
$lt{'ret'}
ENDCRELOAD
}
- my $reg='';
- if ($registration) {
- $reg=&innerregister($forcereg,$titletable);
- }
- my $form=&serverform();
- my $utility=&utilityfunctions();
+ my $reg = $forcereg ? &innerregister($forcereg,$titletable) : '';
+ my $form = &serverform();
+ my $utility = &utilityfunctions();
+
+ #Prepare the message link that indicates the arrival of new mail
+ my $messagelink = Apache::lonmsg::mynewmail() ? "Message (new)" : "Message";
+ $messagelink = ''
+ . mt($messagelink) .'';
- my $messagelink = "";
- if(&Apache::lonmsg::mynewmail()){
- $messagelink = 'Message(new)'
- }else{
- $messagelink = 'Message'
- }
- my $helplink=&Apache::loncommon::top_nav_help('Help');
+ my $helplink = &Apache::loncommon::top_nav_help('Help');
return (<
// BEGIN LON-CAPA Internal
@@ -389,12 +384,13 @@ sub innerregister {
my $reopen=&Apache::lonmenu::reopenmenu();
my $newmail='';
- my $breadcrumb;
if (&Apache::lonmsg::newmail() && !$noremote) {
# We have new mail and remote is up
$newmail= 'swmenu.setstatus("you have","messages");';
}
+
+ my $breadcrumb;
if ($noremote
&& ($env{'request.symb'})
&& ($env{'request.course.id'})) {