[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Sat Sep 7 17:10:01 EDT 2013


raeburn		Sat Sep  7 21:10:01 2013 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	loncommon.pm 
  Log:
  - For 2.11
    - Backport 1.1154
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1075.2.51 loncom/interface/loncommon.pm:1.1075.2.52
--- loncom/interface/loncommon.pm:1.1075.2.51	Sat Sep  7 00:46:18 2013
+++ loncom/interface/loncommon.pm	Sat Sep  7 21:10:00 2013
@@ -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.52 2013/09/07 21:10:00 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1367,17 +1367,18 @@
 }
 
 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 @@
         $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 @@
 
     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 @@
         #    }
 
         $bodytag .= Apache::lonhtmlcommon::scripttag(
-            Apache::lonmenu::utilityfunctions(), 'start');
+            Apache::lonmenu::utilityfunctions($httphost), 'start');
 
         my ($left,$right) = Apache::lonmenu::primary_menu();
 
@@ -5155,7 +5157,7 @@
 
         #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 @@
         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 @@
     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 @@
     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();




More information about the LON-CAPA-cvs mailing list