--- loncom/interface/lonmenu.pm 2003/11/11 20:27:15 1.102 +++ loncom/interface/lonmenu.pm 2003/11/21 21:38:50 1.103 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.102 2003/11/11 20:27:15 albertel Exp $ +# $Id: lonmenu.pm,v 1.103 2003/11/21 21:38:50 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -378,8 +378,20 @@ ENDREALRES # Registered, textual output my $utility=&utilityfunctions(); my $form=&serverform(); - my $inlinebuttons= + my $inlinebuttons=''; + + if ($ENV{'browser.interface'} eq 'textual') { + $inlinebuttons= join('',map { (defined($_)?$_:'') } @inlineremote); + } else { + $inlinebuttons=(<$inlineremote[21] $inlineremote[23] +$inlineremote[61]$inlineremote[62]$inlineremote[63] +$inlineremote[71]$inlineremote[72]$inlineremote[73] +$inlineremote[81]$inlineremote[82]$inlineremote[83] +$inlineremote[91]$inlineremote[92]$inlineremote[93] +ENDINLINE + } $result =(< // BEGIN LON-CAPA Internal @@ -657,23 +669,33 @@ sub switch { my $text=$top.' '.$bot; $text=~s/\s*\-\s*//gs; my $pic= - ''.$text.''; - if ($nobreak==3) { - $inlineremote[10*$row+$col]="\n". - ''.$text. - ''. - ''.$pic.''; - } elsif ($nobreak) { - $inlineremote[10*$row+$col]="\n". - ''. - ''.$pic. - ''.$text.''; + ''.$text.''; + if (($ENV{'browser.interface'} eq 'textual') || ($ENV{'browser.interface'} eq 'faketextual')) { +# Accessibility + if ($nobreak==3) { + $inlineremote[10*$row+$col]="\n". + ''.$text. + ''. + ''.$pic.''; + } elsif ($nobreak) { + $inlineremote[10*$row+$col]="\n". + ''. + ''.$pic. + ''.$text.''; + } else { + $inlineremote[10*$row+$col]="\n". + ''. + ''.$pic. + ''.$desc. + ''; + } } else { - $inlineremote[10*$row+$col]="\n". - ''. - ''.$pic. - ''.$desc. - ''; +# Inline Menu + $inlineremote[10*$row+$col]= + ''.$pic. + ''.$desc. + ''; } } return ''; @@ -916,7 +938,8 @@ sub handler { $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain); $font=&Apache::loncommon::designparm($function.'.font',$domain); # ---- Print the screen, pretent to be in text mode to generate text-based menu - unless ($ENV{'brower.interface'} eq 'textual') { + unless ($ENV{'browser.interface'} eq 'textual') { + $ENV{'browser.interface'}='faketextual'; $ENV{'environment.remote'}='off'; } my $utility=&utilityfunctions();