--- loncom/interface/loncommon.pm 2009/10/01 17:25:17 1.893
+++ loncom/interface/loncommon.pm 2009/10/13 13:18:24 1.897
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.893 2009/10/01 17:25:17 raeburn Exp $
+# $Id: loncommon.pm,v 1.897 2009/10/13 13:18:24 wenzelju Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -493,6 +493,7 @@ sub coursebrowser_javascript {
$output .= <<"ENDSTDBRW";
function opencrsbrowser(formname,uname,udom,desc,extra_element,multflag,crstype) {
var url = '/adm/pickcourse?';
+ var formid = getFormIdByName(formname);
var domainfilter = getDomainFromSelectbox(formname,udom);
if (domainfilter != null) {
if (domainfilter != '') {
@@ -2954,7 +2955,7 @@ sub messagewrapper {
sub noteswrapper {
my ($link,$un,$do)=@_;
return
-"$link";
+"$link";
}
# ------------------------------------------------------------- Aboutme Wrapper
@@ -4440,29 +4441,47 @@ sub bodytag {
if ($env{'environment.remote'} eq 'off') {
# No Remote
- if ($env{'request.state'} eq 'construct') {
- $forcereg=1;
- }
+ if ($env{'request.state'} eq 'construct') {
+ $forcereg=1;
+ }
-# if ($env{'request.state'} eq 'construct') {
-# $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls
-# }
+ # if ($env{'request.state'} eq 'construct') {
+ # $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls
+ # }
my $titletable = '
'
- ." $titleinfo $dc_info | "
- .'
';
+ ." $titleinfo $dc_info | "
+ .'
';
- if ($no_nav_bar) {
- $bodytag .= $titletable;
- } else {
- $bodytag .= qq|$name $role
- $realm $dc_info
| unless $env{'form.inhibitmenu'};
+ if ($no_nav_bar) {
+ $bodytag .= $titletable;
+ } else {
+ $bodytag .= qq|$name $role
+ $realm $dc_info
| unless $env{'form.inhibitmenu'};
- if ($env{'request.state'} eq 'construct') {
- $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$titletable);
- } else {
- $bodytag .= &Apache::lonmenu::menubuttons($forcereg).$titletable;
- }
+#SD $titletable is obsolete
+#SD if ($env{'request.state'} eq 'construct') {
+#SD $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$titletable);
+#SD } else {
+#SD $bodytag .= &Apache::lonmenu::menubuttons($forcereg).$titletable;
+#SD }
+ if ( $env{'form.inhibitmenu'} eq 'yes'
+ || $ENV{'REQUEST_URI'} eq '/adm/logout'
+ || $env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {
+
+ return $bodytag;
+ }
+
+ $bodytag .= Apache::lonhtmlcommon::scripttag(
+ Apache::lonmenu::utilityfunctions(),
+ 'start');
+ $bodytag .= Apache::lonmenu::primary_menu();
+ $bodytag .= Apache::lonmenu::secondary_menu();
+ #SD remove next line
+ #$bodytag .= Apache::lonmenu::menubuttons($forcereg);
+ $bodytag .= Apache::lonmenu::serverform();
+ $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
+ $bodytag .= Apache::lonmenu::innerregister($forcereg) if $forcereg;
}
return $bodytag;
}
@@ -4482,7 +4501,7 @@ sub bodytag {
:''.&mt('Switch to Inline Menu Mode').'');
$bodytag .= qq|$name $role
$realm $dc_info
-