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

raeburn raeburn at source.lon-capa.org
Sun Jul 28 10:05:39 EDT 2019


raeburn		Sun Jul 28 14:05:39 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	loncommon.pm 
  Log:
  - For 2.11
    Backport 1.1274
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1075.2.132 loncom/interface/loncommon.pm:1.1075.2.133
--- loncom/interface/loncommon.pm:1.1075.2.132	Fri Jul 19 13:19:50 2019
+++ loncom/interface/loncommon.pm	Sun Jul 28 14:05:38 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1075.2.132 2019/07/19 13:19:50 raeburn Exp $
+# $Id: loncommon.pm,v 1.1075.2.133 2019/07/28 14:05:38 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5394,6 +5394,10 @@
 
 =item * $args, optional argument valid values are
             no_auto_mt_title -> prevents &mt()ing the title arg
+            use_absolute     -> for external resource or syllabus, this will
+                                contain https://<hostname> if server uses
+                                https (as per hosts.tab), but request is for http
+            hostname         -> hostname, from $r->hostname().
 
 =item * $advtoolsref, optional argument, ref to an array containing
             inlineremote items to be added in "Functions" menu below
@@ -5419,6 +5423,7 @@
     }
     if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); }
     my $httphost = $args->{'use_absolute'};
+    my $hostname = $args->{'hostname'};
 
     $function = &get_users_function() if (!$function);
     my $img =    &designparm($function.'.img',$domain);
@@ -5507,7 +5512,7 @@
         &Apache::lonmenu::prepare_functions($env{'request.noversionuri'},
                                             $forcereg,$args->{'group'},
                                             $args->{'bread_crumbs'},
-                                            $advtoolsref,'',\$forbodytag);
+                                            $advtoolsref,'','',\$forbodytag);
         unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') {
             $funclist = $forbodytag;
         }
@@ -5553,17 +5558,19 @@
             $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
             if ($env{'request.state'} eq 'construct') {
                 $bodytag .= &Apache::lonmenu::innerregister($forcereg,
-                                $args->{'bread_crumbs'});
+                                $args->{'bread_crumbs'},'','',$hostname);
             } elsif ($forcereg) {
                 $bodytag .= &Apache::lonmenu::innerregister($forcereg,undef,
                                                             $args->{'group'},
-                                                            $args->{'hide_buttons'});
+                                                            $args->{'hide_buttons',
+                                                            $hostname});
             } else {
                 my $forbodytag;
                 &Apache::lonmenu::prepare_functions($env{'request.noversionuri'},
                                                     $forcereg,$args->{'group'},
                                                     $args->{'bread_crumbs'},
-                                                    $advtoolsref,'',\$forbodytag);
+                                                    $advtoolsref,'',$hostname,
+                                                    \$forbodytag);
                 unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') {
                     $bodytag .= $forbodytag;
                 }
@@ -8089,6 +8096,10 @@
                                     to lonhtmlcommon::breadcrumbs
              group          -> includes the current group, if page is for a
                                specific group
+             use_absolute   -> for request for external resource or syllabus, this
+                               will contain https://<hostname> if server uses
+                               https (as per hosts.tab), but request is for http
+             hostname       -> hostname, originally from $r->hostname(), (optional).
 
 =back
 




More information about the LON-CAPA-cvs mailing list