--- loncom/interface/lonmenu.pm 2013/08/13 14:17:37 1.369.2.46 +++ loncom/interface/lonmenu.pm 2013/12/27 19:10:02 1.369.2.49 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.46 2013/08/13 14:17:37 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.49 2013/12/27 19:10:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -303,8 +303,14 @@ sub primary_menu { $menu{$position} .= prep_menuitem($menuitem); } } - return ("
    $menu{'left'}
", - "
    $menu{'right'}
"); + my @output = ('',''); + if ($menu{'left'} ne '') { + $output[0] = "
    $menu{'left'}
"; + } + if ($menu{'right'} ne '') { + $output[1] = "
    $menu{'right'}
"; + } + return @output; } #returns hashref {user=>'',dom=>''} containing: @@ -333,6 +339,7 @@ sub getauthor{ } sub secondary_menu { + my ($httphost) = @_; my $menu; my $crstype = &Apache::loncommon::course_type(); @@ -465,7 +472,8 @@ sub secondary_menu { ($roleswitcher_js,$roleswitcher_form,my $switcher) = &roles_selector( $env{'course.' . $env{'request.course.id'} . '.domain'}, - $env{'course.' . $env{'request.course.id'} . '.num'} + $env{'course.' . $env{'request.course.id'} . '.num'}, + $httphost ); $menu .= $switcher; } else { @@ -849,7 +857,7 @@ ENDMENUITEMS # wishlist is only available for users with access to resource-pool # and links can only be set for resources within the resource-pool $menuitems .= (<'."\n". + '
'."\n". ' '."\n". ' '."\n".