--- loncom/interface/lonmainmenu.pm 2010/01/05 15:27:31 1.8.4.6 +++ loncom/interface/lonmainmenu.pm 2010/01/15 04:12:54 1.8.4.7 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # displays the main menu # -# $Id: lonmainmenu.pm,v 1.8.4.6 2010/01/05 15:27:31 raeburn Exp $ +# $Id: lonmainmenu.pm,v 1.8.4.7 2010/01/15 04:12:54 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -103,10 +103,19 @@ ENDSCRIPT $r->print(&Apache::loncommon::start_page( 'Main Menu', $script_tag, {'bread_crumbs' => 1})); + my $rolecount = 0; + unless (($custommenu) || ($env{'user.domain'} eq 'gcitest')) { + foreach my $envkey (keys(%env)) { + next unless ($envkey =~ /^user\.role\./); + $rolecount ++; + } + } if ($custommenu) { $r->print(&Apache::lonmenu::inlinemenu('gcicustom',$switcher).$form); } elsif ($env{'user.domain'} eq 'gcitest') { $r->print(&Apache::lonmenu::inlinemenu('gcistudent',$switcher).$form); + } elsif (!$rolecount) { + $r->print(&Apache::lonmenu::inlinemenu('gcinorole').$form); } else { $r->print(&Apache::lonmenu::inlinemenu().$form); }