Diff for /loncom/interface/lonmenu.pm between versions 1.170 and 1.171

version 1.170, 2006/04/07 21:56:01 version 1.171, 2006/04/07 22:28:40
Line 40  package Apache::lonmenu; Line 40  package Apache::lonmenu;
   
 use strict;  use strict;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::Constants qw(:common);  
 use Apache::lonhtmlcommon();  use Apache::lonhtmlcommon();
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonenc();  use Apache::lonenc();
Line 1226  sub get_nav_status { Line 1225  sub get_nav_status {
     return $navstatus;      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=(<<ENDSCRIPT);  
 <script type="text/javascript">  
 $utility  
 </script>  
 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('<table>'.&inlinemenu().'</table>'.$form);  
     $r->print(&Apache::loncommon::end_page());  
     return OK;  
 }  
   
 # ================================================================ Main Program  # ================================================================ Main Program
   
 BEGIN {  BEGIN {

Removed from v.1.170  
changed lines
  Added in v.1.171


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>