--- loncom/interface/lonmenu.pm 2007/10/11 22:52:53 1.229 +++ loncom/interface/lonmenu.pm 2007/10/30 23:46:02 1.230 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.229 2007/10/11 22:52:53 albertel Exp $ +# $Id: lonmenu.pm,v 1.230 2007/10/30 23:46:02 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -795,12 +795,19 @@ sub load_remote_msg {

$link

ENDREMOTEFORM } + +sub get_menu_name { + my $hostid = $Apache::lonnet::perlvar{'lonHostID'}; + $hostid =~ s/\W//g; + return 'LCmenu'.$hostid; +} + # ================================================================= Reopen menu sub reopenmenu { if (($env{'browser.interface'} eq 'textual') || ($env{'environment.remote'} eq 'off')) { return ''; } - my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; + my $menuname = &get_menu_name(); my $nothing = &Apache::lonhtmlcommon::javascript_nothing(); return('window.open('.$nothing.',"'.$menuname.'","",false);'); } @@ -813,7 +820,7 @@ sub open { ($env{'environment.remote'} eq 'off')) { return ''; } - my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; + my $menuname = &get_menu_name(); # unless (shift eq 'unix') { # resizing does not work on linux because of virtual desktop sizes @@ -941,7 +948,7 @@ sub secondlevel { } sub openmenu { - my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; + my $menuname = &get_menu_name(); if (($env{'browser.interface'} eq 'textual') || ($env{'environment.remote'} eq 'off')) { return ''; } my $nothing = &Apache::lonhtmlcommon::javascript_nothing(); @@ -1091,7 +1098,7 @@ sub rawconfig { sub close { if (($env{'browser.interface'} eq 'textual') || ($env{'environment.remote'} eq 'off')) { return ''; } - my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; + my $menuname = &get_menu_name(); return(< window.status='Accessing Remote Control';