--- loncom/interface/loncommon.pm 2006/04/11 20:00:44 1.331
+++ loncom/interface/loncommon.pm 2006/04/14 21:09:51 1.338
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.331 2006/04/11 20:00:44 albertel Exp $
+# $Id: loncommon.pm,v 1.338 2006/04/14 21:09:51 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -61,6 +61,8 @@ use POSIX qw(strftime mktime);
use Apache::lonmenu();
use Apache::lonlocal;
use HTML::Entities;
+use Apache::lonhtmlcommon();
+use Apache::loncoursedata();
my $readit;
@@ -2751,7 +2753,10 @@ Inputs:
=item * $notopbar, if true, keep the 'what is this' info but remove the
navigational links
-=item * $bgcolor, used to override the bg coor on a webpage to a specific value
+=item * $bgcolor, used to override the bgcolor on a webpage to a specific value
+
+=item * $notitle, if true keep the nav controls, but remove the title bar
+
=back
@@ -2764,7 +2769,7 @@ other decorations will be returned.
sub bodytag {
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle,
- $notopbar,$bgcolor)=@_;
+ $notopbar,$bgcolor,$notitle)=@_;
$title=&mt($title);
$function = &get_users_function() if (!$function);
my $img=&designparm($function.'.img',$domain);
@@ -2816,14 +2821,18 @@ END
my $upperleft='
';
- if ($bodyonly) {
+ if ($bodyonly
+ || ($env{'request.state'} eq 'construct'
+ && $env{'environment.remote'} ne 'off' )) {
return $bodytag;
} elsif ($env{'browser.interface'} eq 'textual') {
# Accessibility
- return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',
- $forcereg).
- '
LON-CAPA: '.$title.'
';
+ $bodytag.=&Apache::lonmenu::menubuttons($forcereg,$forcereg);
+ if (!$notitle) {
+ $bodytag.='LON-CAPA: '.$title.'
';
+ }
+ return $bodytag;
} elsif ($env{'environment.remote'} eq 'off') {
# No Remote
my $roleinfo=(<'.
''.
$titleinfo.' | '.$roleinfo.'
';
- if ($env{'request.state'} eq 'construct') {
+ }
+ if ($env{'request.state'} eq 'construct') {
if ($notopbar) {
$bodytag .= $titletable;
} else {
- $bodytag .= &Apache::lonmenu::menubuttons($forcereg,'web',$forcereg,$titletable);
+ $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg,
+ $titletable);
}
} else {
if ($notopbar) {
$bodytag .= $titletable;
} else {
- $bodytag .= &Apache::lonmenu::menubuttons($forcereg,'web',$forcereg).
+ $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg).
$titletable;
}
}
@@ -2913,6 +2927,9 @@ ENDROLE
# Explicit link to get inline menu
my $menu='
'.&mt('Switch to Inline Menu Mode').'';
#
+ if ($notitle) {
+ return $bodytag;
+ }
return(<
@@ -3010,7 +3027,6 @@ Inputs: $title - optional title for the
$args - optional arguments
force_register - if is true call registerurl so the remote is
informed
-
redirect - array ref of seconds before redirect occurs
url to redirect to
(side effect of setting
@@ -3118,6 +3134,11 @@ Inputs: $title - optional title for the
is not auto translated like the $title is
frameset -> if true will start with a