$name $role
+ $bodytag .= qq|
$left $role
$realm $dc_info
|;
+ return $bodytag;
}
- return $bodytag;
- }
-
- unless ($env{'request.symb'} =~ m/\.page___\d+___/) {
- $bodytag .= qq|
$name $role
|;
- }
- $bodytag .= Apache::lonhtmlcommon::scripttag(
- Apache::lonmenu::utilityfunctions(), 'start');
+ unless ($env{'request.symb'} =~ m/\.page___\d+___/) {
+ $bodytag .= qq|
$left $role
|;
+ }
- $bodytag .= Apache::lonmenu::primary_menu();
+ $bodytag .= $right;
- if ($dc_info) {
- $dc_info = &dc_courseid_toggle($dc_info);
+ if ($dc_info) {
+ $dc_info = &dc_courseid_toggle($dc_info);
+ }
+ $bodytag .= qq|
$realm $dc_info
|;
}
- $bodytag .= qq|
$realm $dc_info
|;
+ #if directed to not display the secondary menu, don't.
+ if ($args->{'no_secondary_menu'}) {
+ return $bodytag;
+ }
#don't show menus for public users
if (!$public){
- $bodytag .= Apache::lonmenu::secondary_menu();
+ unless ($args->{'no_inline_menu'}) {
+ $bodytag .= Apache::lonmenu::secondary_menu($httphost,$ltiscope,$ltimenu,
+ $args->{'no_primary_menu'},
+ $menucoll,$menuref,
+ $args->{'links_disabled'},
+ $args->{'links_target'});
+ }
$bodytag .= Apache::lonmenu::serverform();
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
if ($env{'request.state'} eq 'construct') {
$bodytag .= &Apache::lonmenu::innerregister($forcereg,
- $args->{'bread_crumbs'});
- } elsif ($forcereg) {
- $bodytag .= &Apache::lonmenu::innerregister($forcereg);
+ $args->{'bread_crumbs'},'','',$hostname,
+ $ltiscope,$ltiuri,$showncrumbsref);
+ } elsif ($forcereg) {
+ $bodytag .= &Apache::lonmenu::innerregister($forcereg,undef,
+ $args->{'group'},$args->{'hide_buttons'},
+ $hostname,$ltiscope,$ltiuri,$showncrumbsref);
+ } else {
+ my $forbodytag;
+ &Apache::lonmenu::prepare_functions($env{'request.noversionuri'},
+ $forcereg,$args->{'group'},
+ $args->{'bread_crumbs'},
+ $advtoolsref,'',$hostname,
+ \$forbodytag);
+ unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') {
+ $bodytag .= $forbodytag;
+ }
}
}else{
# this is to seperate menu from content when there's no secondary
@@ -5103,6 +6168,54 @@ sub bodytag {
}
return $bodytag;
+ }
+
+#
+# Top frame rendering, Remote is up
+#
+
+ my $imgsrc = $img;
+ if ($img =~ /^\/adm/) {
+ $imgsrc = &lonhttpdurl($img);
+ }
+ my $upperleft='
';
+
+ my $help=($no_inline_link?''
+ :&Apache::loncommon::top_nav_help('Help'));
+
+ # Explicit link to get inline menu
+ my $menu= ($no_inline_link?''
+ :'
'.&mt('Switch to Inline Menu Mode').'');
+
+ if ($dc_info) {
+ $dc_info = qq|
($dc_info)|;
+ }
+
+ my $name = &plainname($env{'user.name'},$env{'user.domain'});
+ unless ($public) {
+ $name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'},
+ undef,'LC_menubuttons_link');
+ }
+
+ unless ($env{'form.inhibitmenu'}) {
+ $bodytag .= qq|
$name $role
+
$realm $dc_info
|;
+ }
+ if ($env{'request.state'} eq 'construct') {
+ if (!$public){
+ if ($env{'request.state'} eq 'construct') {
+ $funclist = &Apache::lonhtmlcommon::scripttag(
+ &Apache::lonmenu::utilityfunctions($httphost), 'start').
+ &Apache::lonhtmlcommon::scripttag('','end').
+ &Apache::lonmenu::innerregister($forcereg,
+ $args->{'bread_crumbs'});
+ }
+ }
+ }
+ return $bodytag."\n".$funclist;
}
sub dc_courseid_toggle {
@@ -5134,12 +6247,19 @@ sub make_attr_string {
delete($attr_ref->{$key});
}
}
- $attr_ref->{'onload'} = $on_load;
- $attr_ref->{'onunload'}= $on_unload;
+ if ($env{'environment.remote'} eq 'on') {
+ $attr_ref->{'onload'} =
+ &Apache::lonmenu::loadevents(). $on_load;
+ $attr_ref->{'onunload'}=
+ &Apache::lonmenu::unloadevents().$on_unload;
+ } else {
+ $attr_ref->{'onload'} = $on_load;
+ $attr_ref->{'onunload'}= $on_unload;
+ }
}
my $attr_string;
- foreach my $attr (keys(%$attr_ref)) {
+ foreach my $attr (sort(keys(%$attr_ref))) {
$attr_string .= " $attr=\"".$attr_ref->{$attr}.'" ';
}
return $attr_string;
@@ -5165,12 +6285,44 @@ i.e., $env{'internal.head.redirect'} exi
sub endbodytag {
my ($args) = @_;
- my $endbodytag='';
- $endbodytag=&Apache::lontexconvert::jsMath_process()."\n".$endbodytag;
+ my $endbodytag;
+ unless ((ref($args) eq 'HASH') && ($args->{'notbody'})) {
+ $endbodytag='