--- loncom/interface/lonmenu.pm 2007/10/11 22:49:49 1.228
+++ 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.228 2007/10/11 22:49:49 albertel Exp $
+# $Id: lonmenu.pm,v 1.230 2007/10/30 23:46:02 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -206,10 +206,6 @@ ENDDOCS
$lt{'groups'} |
ENDGROUPS
}
- foreach my $key (sort(keys(%env))) {
- next if ($key !~ /^request/);
- &Apache::lonnet::logthis("$key =>".$env{$key});
- }
if (&show_return_link()) {
my $escreload=&escape('return:');
$reloadlink=(<$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);');
}
@@ -817,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
@@ -945,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();
@@ -1095,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';