--- loncom/interface/loncommon.pm 2013/09/07 00:46:18 1.1075.2.51
+++ loncom/interface/loncommon.pm 2013/09/22 01:58:13 1.1075.2.53
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1075.2.51 2013/09/07 00:46:18 raeburn Exp $
+# $Id: loncommon.pm,v 1.1075.2.53 2013/09/22 01:58:13 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1367,17 +1367,18 @@ END
}
sub help_menu_js {
- my ($text) = @_;
+ my ($httphost) = @_;
my $stayOnPage = 1;
my $width = 620;
my $height = 600;
my $helptopic=&general_help();
- my $details_link = '/adm/help/'.$helptopic.'.hlp';
+ my $details_link = $httphost.'/adm/help/'.$helptopic.'.hlp';
my $nothing=&Apache::lonhtmlcommon::javascript_nothing();
my $start_page =
&Apache::loncommon::start_page('Help Menu', undef,
{'frameset' => 1,
'js_ready' => 1,
+ 'use_absolute' => $httphost,
'add_entries' => {
'border' => '0',
'rows' => "110,*",},});
@@ -5041,6 +5042,7 @@ sub bodytag {
$public = 1;
}
if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); }
+ my $httphost = $args->{'use_absolute'};
$function = &get_users_function() if (!$function);
my $img = &designparm($function.'.img',$domain);
@@ -5112,7 +5114,7 @@ sub bodytag {
my $funclist;
if (($env{'environment.remote'} eq 'on') && ($env{'request.state'} ne 'construct')) {
- $bodytag .= Apache::lonhtmlcommon::scripttag(Apache::lonmenu::utilityfunctions(), 'start')."\n".
+ $bodytag .= Apache::lonhtmlcommon::scripttag(Apache::lonmenu::utilityfunctions($httphost), 'start')."\n".
Apache::lonmenu::serverform();
my $forbodytag;
&Apache::lonmenu::prepare_functions($env{'request.noversionuri'},
@@ -5129,7 +5131,7 @@ sub bodytag {
# }
$bodytag .= Apache::lonhtmlcommon::scripttag(
- Apache::lonmenu::utilityfunctions(), 'start');
+ Apache::lonmenu::utilityfunctions($httphost), 'start');
my ($left,$right) = Apache::lonmenu::primary_menu();
@@ -5155,7 +5157,7 @@ sub bodytag {
#don't show menus for public users
if (!$public){
- $bodytag .= Apache::lonmenu::secondary_menu();
+ $bodytag .= Apache::lonmenu::secondary_menu($httphost);
$bodytag .= Apache::lonmenu::serverform();
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
if ($env{'request.state'} eq 'construct') {
@@ -5218,7 +5220,7 @@ sub bodytag {
if (!$public){
if ($env{'request.state'} eq 'construct') {
$funclist = &Apache::lonhtmlcommon::scripttag(
- &Apache::lonmenu::utilityfunctions(), 'start').
+ &Apache::lonmenu::utilityfunctions($httphost), 'start').
&Apache::lonhtmlcommon::scripttag('','end').
&Apache::lonmenu::innerregister($forcereg,
$args->{'bread_crumbs'});
@@ -7249,6 +7251,7 @@ sub headtag {
my $function = $args->{'function'} || &get_users_function();
my $domain = $args->{'domain'} || &determinedomain();
my $bgcolor = $args->{'bgcolor'} || &designparm($function.'.pgbg',$domain);
+ my $httphost = $args->{'use_absolute'};
my $url = join(':',$env{'user.name'},$env{'user.domain'},
$Apache::lonnet::perlvar{'lonVersion'},
#time(),
@@ -7272,7 +7275,7 @@ sub headtag {
if (!$args->{'no_nav_bar'}
&& !$args->{'only_body'}
&& !$args->{'frameset'}) {
- $result .= &help_menu_js();
+ $result .= &help_menu_js($httphost);
$result.=&modal_window();
$result.=&togglebox_script();
$result.=&wishlist_window();
@@ -9771,11 +9774,10 @@ sub ask_for_embedded_content {
my $numexisting = 0;
my $numunused = 0;
my ($output,$upload_output,$toplevel,$url,$udom,$uname,$getpropath,$cdom,$cnum,
- $fileloc,$filename,$delete_output,$modify_output,$title,$symb,$path);
+ $fileloc,$filename,$delete_output,$modify_output,$title,$symb,$path,$navmap);
my $heading = &mt('Upload embedded files');
my $buttontext = &mt('Upload');
- my ($navmap,$cdom,$cnum);
if ($env{'request.course.id'}) {
if ($actionurl eq '/adm/dependencies') {
$navmap = Apache::lonnavmaps::navmap->new();
@@ -10427,7 +10429,8 @@ sub upload_embedded {
# Check if extension is valid
if (($fname =~ /\.(\w+)$/) &&
(&Apache::loncommon::fileembstyle($1) eq 'hdn')) {
- $output .= &mt('Invalid file extension ([_1]) - reserved for LONCAPA use - rename the file with a different extension and re-upload. ',$1).'
';
+ $output .= &mt('Invalid file extension ([_1]) - reserved for internal use.',$1)
+ .' '.&mt('Rename the file with a different extension and re-upload.').'
';
next;
} elsif (($fname =~ /\.(\w+)$/) &&
(!defined(&Apache::loncommon::fileembstyle($1)))) {