--- loncom/interface/loncommon.pm 2024/10/07 00:59:43 1.1438 +++ loncom/interface/loncommon.pm 2024/10/12 21:41:25 1.1442 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1438 2024/10/07 00:59:43 raeburn Exp $ +# $Id: loncommon.pm,v 1.1442 2024/10/12 21:41:25 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -6877,7 +6877,6 @@ sub bodytag { my $hostname = $args->{'hostname'}; $function = &get_users_function() if (!$function); - my $img = &designparm($function.'.img',$domain); my $font = &designparm($function.'.font',$domain); my $pgbg = $bgcolor || &designparm($function.'.pgbg',$domain); @@ -7000,8 +6999,12 @@ sub bodytag { # $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls # } - $bodytag .= Apache::lonhtmlcommon::scripttag( - Apache::lonmenu::utilityfunctions($httphost), 'start'); + my $need_endlcint; + unless ($args->{'switchserver'}) { + $bodytag .= Apache::lonhtmlcommon::scripttag( + Apache::lonmenu::utilityfunctions($httphost), 'start'); + $need_endlcint = 1; + } my $collapsible; if ($args->{'collapsible_header'} ne '') { @@ -7037,6 +7040,9 @@ END } $bodytag .= qq|
$left $role
$realm $dc_info
|; + if ($need_endlcint) { + $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); + } return $bodytag; } @@ -7054,6 +7060,9 @@ END #if directed to not display the secondary menu, don't. if ($args->{'no_secondary_menu'}) { + if ($need_endlcint) { + $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); + } return $bodytag; } #don't show menus for public users @@ -7066,7 +7075,9 @@ END $args->{'links_target'}); } $bodytag .= Apache::lonmenu::serverform(); - $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); + if ($need_endlcint) { + $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); + } if ($env{'request.state'} eq 'construct') { $bodytag .= &Apache::lonmenu::innerregister($forcereg, $args->{'bread_crumbs'},'','',$hostname, @@ -7082,11 +7093,13 @@ END $args->{'bread_crumbs'}, $advtoolsref,'',$hostname); } - }else{ - # this is to seperate menu from content when there's no secondary - # menu. Especially needed for public accessible ressources. + } else { + # this is to separate menu from content when there's no secondary + # menu. Especially needed for publicly accessible resources. $bodytag .= '
'; - $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); + if ($need_endlcint) { + $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); + } } if ($args->{'collapsible_header'} ne '') { $bodytag .= $args->{'collapsible_header'}. @@ -7221,7 +7234,6 @@ Inputs: (all optional) sub standard_css { my ($function,$domain,$bgcolor) = @_; $function = &get_users_function() if (!$function); - my $img = &designparm($function.'.img', $domain); my $tabbg = &designparm($function.'.tabbg', $domain); my $font = &designparm($function.'.font', $domain); my $fontmenu = &designparm($function.'.fontmenu', $domain); @@ -9426,7 +9438,7 @@ sub headtag { $inhibitprint = &print_suppression(); } - if ((!$args->{'frameset'} && !$args->{'switchserver'}) { + if (!$args->{'frameset'} && !$args->{'switchserver'}) { $result .= &Apache::lonhtmlcommon::htmlareaheaders(); } if ($args->{'force_register'} && $env{'request.noversionuri'} !~ m{^/res/adm/pages/}) {