--- loncom/interface/loncommon.pm 2012/12/22 15:43:03 1.1075.2.20 +++ loncom/interface/loncommon.pm 2012/12/22 16:03:25 1.1075.2.22 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1075.2.20 2012/12/22 15:43:03 raeburn Exp $ +# $Id: loncommon.pm,v 1.1075.2.22 2012/12/22 16:03:25 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5026,8 +5026,6 @@ sub bodytag { } if (!$realm) { $realm=' '; } -# Set messages - my $messages=&domainlogo($domain); my $extra_body_attr = &make_attr_string($forcereg,\%design); @@ -5068,7 +5066,19 @@ sub bodytag { if ($env{'request.state'} eq 'construct') { $forcereg=1; } - unless ($env{'environment.remote'} eq 'on') { + my $funclist; + if (($env{'environment.remote'} eq 'on') && ($env{'request.state'} ne 'construct')) { + $bodytag .= Apache::lonhtmlcommon::scripttag(Apache::lonmenu::utilityfunctions(), 'start')."\n". + Apache::lonmenu::serverform(); + my $forbodytag; + &Apache::lonmenu::prepare_functions($env{'request.noversionuri'}, + $forcereg,$args->{'group'}, + $args->{'bread_crumbs'}, + $advtoolsref,'',\$forbodytag); + unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') { + $funclist = $forbodytag; + } + } else { # if ($env{'request.state'} eq 'construct') { # $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls @@ -5077,13 +5087,11 @@ sub bodytag { if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { - unless ($env{'request.noversionuri'} =~ m{/res/adm/pages/bookmarkmenu/}) { - if ($dc_info) { - $dc_info = qq|$dc_info|; - } - $bodytag .= qq|
$name $role
- $realm $dc_info
|; + if ($dc_info) { + $dc_info = qq|$dc_info|; } + $bodytag .= qq|
$name $role
+ $realm $dc_info
|; return $bodytag; } @@ -5110,13 +5118,17 @@ sub bodytag { $bodytag .= &Apache::lonmenu::innerregister($forcereg, $args->{'bread_crumbs'}); } elsif ($forcereg) { - $bodytag .= &Apache::lonmenu::innerregister($forcereg); + $bodytag .= &Apache::lonmenu::innerregister($forcereg,undef, + $args->{'group'}); } else { - $bodytag .= - &Apache::lonmenu::prepare_functions($env{'request.noversionuri'}, - $forcereg,$args->{'group'}, - $args->{'bread_crumbs'}, - $advtoolsref); + my $forbodytag; + &Apache::lonmenu::prepare_functions($env{'request.noversionuri'}, + $forcereg,$args->{'group'}, + $args->{'bread_crumbs'}, + $advtoolsref,'',\$forbodytag); + unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') { + $bodytag .= $forbodytag; + } } }else{ # this is to seperate menu from content when there's no secondary @@ -5152,7 +5164,6 @@ sub bodytag {
  • $menu
  • $realm $dc_info
    |; } - my $funclist; if ($env{'request.state'} eq 'construct') { if (!$public){ if ($env{'request.state'} eq 'construct') { @@ -5164,17 +5175,7 @@ sub bodytag { } } } - return(< -$upperleft - $messages  - -$titleinfo $dc_info $menu - - -$funclist -ENDBODY + return $bodytag."\n".$funclist; } sub dc_courseid_toggle { @@ -7491,6 +7492,8 @@ sub start_page { }else{ $result .= &Apache::lonhtmlcommon::breadcrumbs(); } + } elsif ($env{'request.noversionuri'} =~ m{^/res/}) { + $result .= '

    '; } return $result; }