--- loncom/interface/lonmenu.pm 2009/05/19 14:05:19 1.267
+++ loncom/interface/lonmenu.pm 2009/06/02 17:25:03 1.269
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.267 2009/05/19 14:05:19 droeschl Exp $
+# $Id: lonmenu.pm,v 1.269 2009/06/02 17:25:03 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -26,15 +26,10 @@
# http://www.lon-capa.org/
#
#
-# There are two parameters controlling the action of this module:
-#
-# browser.interface - if this is 'textual', it overrides the second parameter
-# and goes to screen reader PDA mode
+# There is one parameter controlling the action of this module:
#
# environment.remote - if this is 'on', the routines controll the remote
-# control, otherwise they render the main window controls; ignored it
-# browser.interface is 'textual'
-#
+# control, otherwise they render the main window controls;
=head1 NAME
@@ -350,8 +345,7 @@ sub registerurl {
if ($env{'request.state'} eq 'construct') {
$force_title=&Apache::lonxml::display_title();
}
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off') ||
+ if (($env{'environment.remote'} eq 'off') ||
((($env{'request.publicaccess'}) ||
(!&Apache::lonnet::is_on_map(
&unescape($env{'request.noversionuri'})))) &&
@@ -398,12 +392,17 @@ sub innerregister {
my $maptitle = &Apache::lonnet::gettitle($mapurl);
my $restitle = &Apache::lonnet::gettitle(&Apache::lonnet::symbread());
- my @crumbs = ({text => mt("Course Content"), href => "Javascript:gonav('/adm/navmaps')"},
- {text => '...'});
- push @crumbs, {text => $maptitle} if ($maptitle
- && $maptitle ne 'default.sequence'
- && $maptitle ne $coursetitle);
- push @crumbs, {text => $restitle} if $restitle;
+ my @crumbs = ({text => "Course Content",
+ href => "Javascript:gonav('/adm/navmaps')"},
+ {text => '...',
+ no_mt => 1});
+
+ push @crumbs, {text => $maptitle, no_mt => 1} if ($maptitle
+ && $maptitle ne 'default.sequence'
+ && $maptitle ne $coursetitle);
+
+ push @crumbs, {text => $restitle, no_mt => 1} if $restitle;
+
Apache::lonhtmlcommon::clear_breadcrumbs();
Apache::lonhtmlcommon::add_breadcrumb(@crumbs);
$breadcrumb .= Apache::lonhtmlcommon::breadcrumbs(undef,undef,0);
@@ -729,7 +728,7 @@ ENDREGTHIS
} else {
# ========================================== This can or will not be registered
if ($noremote) {
-# Not registered, textual
+# Not registered
$result= (<');
}
#
@@ -896,8 +894,7 @@ ENDSETFLAGS
}
sub maincall() {
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
return(<
main();
@@ -908,8 +905,7 @@ ENDMAINCALL
sub load_remote_msg {
my ($lowerurl)=@_;
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
my $esclowerurl=&escape($lowerurl);
my $link=&mt('[_1]Continue[_2] on in Inline Menu mode'
@@ -933,8 +929,7 @@ sub get_menu_name {
sub reopenmenu {
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
my $menuname = &get_menu_name();
my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
return('window.open('.$nothing.',"'.$menuname.'","",false);');
@@ -943,8 +938,7 @@ sub reopenmenu {
sub open {
my $returnval='';
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ if ($env{'environment.remote'} eq 'off') {
return '';
}
my $menuname = &get_menu_name();
@@ -972,8 +966,7 @@ ENDOPEN
sub clear {
my ($row,$col)=@_;
- unless (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ unless ($env{'environment.remote'} eq 'off') {
return "\n".qq(window.status+='.';swmenu.clearbut($row,$col););
} else {
$inlineremote[10*$row+$col]='';
@@ -998,23 +991,10 @@ sub switch {
my $idx=10*$row+$col;
$category_members{$cat}.=':'.$idx;
- unless (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ unless ($env{'environment.remote'} eq 'off') {
# Remote
return "\n".
qq(window.status+='.';swmenu.switchbutton($row,$col,"$img","$top","$bot","$act","$desc"););
- } elsif ($env{'browser.interface'} eq 'textual') {
-# Accessibility
- if ($nobreak==2) { return ''; }
- my $text=$top.' '.$bot;
- $text=~s/\s*\-\s*//gs;
- if ($nobreak) {
- $inlineremote[$idx]=
- ''.$text.'';
- } else {
- $inlineremote[$idx]="\n
".
- $desc.' '.$text.'';
- }
} else {
# Inline Remote
if ($env{'environment.icons'} ne 'classic') {
@@ -1077,8 +1057,7 @@ sub secondlevel {
sub openmenu {
my $menuname = &get_menu_name();
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
return "window.open(".$nothing.",'".$menuname."');";
}
@@ -1119,8 +1098,7 @@ sub inlinemenu {
sub rawconfig {
my $textualoverride=shift;
my $output='';
- unless (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ unless ($env{'environment.remote'} eq 'off') {
$output.=
"window.status='Opening Remote Control';var swmenu=".&openmenu().
"\nwindow.status='Configuring Remote Control ';";
@@ -1253,8 +1231,7 @@ sub rawconfig {
$uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
}
}
- unless (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ unless ($env{'environment.remote'} eq 'off') {
$output.="\nwindow.status='Synchronizing Time';swmenu.syncclock(1000*".time.");\nwindow.status='Remote Control Configured.';";
if (&Apache::lonmsg::newmail()) {
$output.='swmenu.setstatus("you have","messages");';
@@ -1267,8 +1244,7 @@ sub rawconfig {
# ======================================================================= Close
sub close {
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
my $menuname = &get_menu_name();
return(<
@@ -1310,8 +1286,10 @@ NAVCONTROL
sub utilityfunctions {
my $caller = shift;
- unless (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off') || ($caller eq '/adm/menu')) { return ''; }
+ unless ($env{'environment.remote'} eq 'off' ||
+ $caller eq '/adm/menu') {
+ return ''; }
+
my $currenturl=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$env{'request.noversionuri'}))[0]));
$currenturl=&Apache::lonenc::check_encrypt(&unescape($currenturl));