--- loncom/interface/lonmenu.pm 2003/09/17 01:45:14 1.88 +++ loncom/interface/lonmenu.pm 2003/09/25 17:52:26 1.95 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.88 2003/09/17 01:45:14 www Exp $ +# $Id: lonmenu.pm,v 1.95 2003/09/25 17:52:26 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -145,7 +145,6 @@ ENDRELOAD if ($registration) { $reg=&innerregister($forcereg,$target); } - my $trans=&Apache::lonlocal::endreroutetrans(); return (< // BEGIN LON-CAPA Internal @@ -165,7 +164,6 @@ $navmaps LON-CAPA -$trans @@ -179,6 +177,7 @@ ENDINLINEMENU # ====================================== This gets called in the header section sub registerurl { + &Apache::lonlocal::reroutetrans(); my $forcereg=shift; my $target = shift; my $result = ''; @@ -212,6 +211,7 @@ sub registerurl { # =========== and in the body of the document sub innerregister { + &Apache::lonlocal::reroutetrans(); my $forcereg=shift; my $target = shift; my $result = ''; @@ -641,21 +641,34 @@ sub switch { if ($nobreak==2) { return ''; } my $text=$top.' '.$bot; $text=~s/\s*\-\s*//gs; - $inlineremote[10*$row+$col]="\n".($nobreak?' ':'
'). - ''.$text.' '. - ($nobreak?'':$desc); + if ($nobreak) { + $inlineremote[10*$row+$col]= + ''.$text.''; + } else { + $inlineremote[10*$row+$col]="\n
". + ''.$desc.''; + } } else { # Inline Remote if ($nobreak==2) { return ''; } my $text=$top.' '.$bot; $text=~s/\s*\-\s*//gs; - $inlineremote[10*$row+$col]="\n". - ($nobreak==3?''.$text.''. - ($nobreak?'':''.$desc.'').($nobreak!=1?'':''); + if ($nobreak==3) { + $inlineremote[10*$row+$col]="\n". + ''. + ''.$text. + ''; + } elsif ($nobreak) { + $inlineremote[10*$row+$col]="\n". + ''. + ''.$text. + ''; + } else { + $inlineremote[10*$row+$col]="\n". + ''. + ''.$desc. + ''; + } } return ''; } @@ -875,10 +888,12 @@ ENDSERVERFORM sub handler { my $r = shift; - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only; + &Apache::lonlocal::clearreroutetrans(); + my $form=&serverform(); my $bodytag=&Apache::loncommon::bodytag('Main Menu'); my $function='student'; @@ -911,6 +926,7 @@ $utility $bodytag ENDHEADER $r->print(''.&inlinemenu().'
'.$form); + $r->print(&Apache::lonlocal::endreroutetrans()); $r->print(''); return OK; }