--- loncom/interface/loncommon.pm 2012/12/22 15:43:03 1.1075.2.20 +++ loncom/interface/loncommon.pm 2012/12/22 15:53:00 1.1075.2.21 @@ -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.21 2012/12/22 15:53:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5068,7 +5068,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 @@ -5112,11 +5124,14 @@ sub bodytag { } elsif ($forcereg) { $bodytag .= &Apache::lonmenu::innerregister($forcereg); } 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 +5167,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 +5178,7 @@ sub bodytag { } } } - return(< -$upperleft - $messages  - -$titleinfo $dc_info $menu - - -$funclist -ENDBODY + return $bodytag."\n".$funclist; } sub dc_courseid_toggle { @@ -7491,6 +7495,8 @@ sub start_page { }else{ $result .= &Apache::lonhtmlcommon::breadcrumbs(); } + } elsif ($env{'request.noversionuri'} =~ m{^/res/}) { + $result .= '

    '; } return $result; }