--- loncom/interface/lonmenu.pm 2006/04/07 21:56:01 1.170 +++ loncom/interface/lonmenu.pm 2006/04/07 22:28:40 1.171 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.170 2006/04/07 21:56:01 albertel Exp $ +# $Id: lonmenu.pm,v 1.171 2006/04/07 22:28:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -40,7 +40,6 @@ package Apache::lonmenu; use strict; use Apache::lonnet; -use Apache::Constants qw(:common); use Apache::lonhtmlcommon(); use Apache::loncommon(); use Apache::lonenc(); @@ -1226,56 +1225,6 @@ sub get_nav_status { return $navstatus; } -# ================================================ Handler when called directly - - -sub handler { - my $r = shift; - &Apache::loncommon::no_cache($r); - &Apache::loncommon::content_type($r,'text/html'); - $r->send_http_header; - return OK if $r->header_only; - - my $form; - if ($env{'environment.remote'} ne 'off' && - $env{'browser.interface'} ne 'textual') { - $form=&serverform(); - } - my $function='student'; - if ($env{'request.role'}=~/^(cc|in|ta|ep)/) { - $function='coordinator'; - } - if ($env{'request.role'}=~/^(su|dc|ad|li)/) { - $function='admin'; - } - if (($env{'request.role'}=~/^(au|ca)/) || - ($env{'request.noversionuri'}=~/^(\/priv|\~)/)) { - $function='author'; - } - my $domain=&Apache::loncommon::determinedomain(); - $pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain); - $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain); - $font=&Apache::loncommon::designparm($function.'.font',$domain); - my $script_tag; - if ($env{'environment.remote'} ne 'off') { - my $utility=&utilityfunctions('/adm/menu'); - $script_tag=(< -$utility - -ENDSCRIPT - } -# ---- Print the screen, pretend to be in text mode to generate text-based menu - unless ($env{'browser.interface'} eq 'textual') { - $env{'browser.interface'}='faketextual'; - $env{'environment.remote'}='off'; - } - $r->print(&Apache::loncommon::start_page('Main Menu',$script_tag)); - $r->print(''.&inlinemenu().'
'.$form); - $r->print(&Apache::loncommon::end_page()); - return OK; -} - # ================================================================ Main Program BEGIN {