[LON-CAPA-cvs] cvs: rat(version_2_11_X) / lonpage.pm

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


raeburn		Sun Jul 28 14:10:33 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /rat	lonpage.pm 
  Log:
  - For 2.11
    Backport 1.121, 1.122
  
  
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.111.2.6 rat/lonpage.pm:1.111.2.7
--- rat/lonpage.pm:1.111.2.6	Tue Sep  4 15:16:12 2018
+++ rat/lonpage.pm	Sun Jul 28 14:10:33 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Page Handler
 #
-# $Id: lonpage.pm,v 1.111.2.6 2018/09/04 15:16:12 raeburn Exp $
+# $Id: lonpage.pm,v 1.111.2.7 2019/07/28 14:10:33 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -185,6 +185,7 @@
       my $fn=$env{'request.course.fn'};
       if (-e "$fn.db") {
           my %buttonshide;
+          my $hostname = $r->hostname();
           if (tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640)) {
 # ------------------------------------------------------------------- Hash tied
               my $firstres=$hash{'map_start_'.$requrl};
@@ -652,7 +653,7 @@
                           my $avespan=$lcm/($#colcont+1);
                           for ($j=0;$j<=$#colcont;$j++) {
                               my $rid=$colcont[$j];
-			      my $metainfo =&get_buttons(\%hash,$rid,\%buttonshide).'<br />';
+			      my $metainfo =&get_buttons(\%hash,$rid,\%buttonshide,$hostname).'<br />';
 			    unless (($target eq 'tex') || ($target eq 'tex_answer')) {
 				$r->print('<td colspan="'.$avespan.'"');
 			    }
@@ -780,7 +781,7 @@
 }
 
 sub get_buttons {
-    my ($hash,$rid,$buttonshide) = @_;
+    my ($hash,$rid,$buttonshide,$hostname) = @_;
 
     my $metainfo = '';
     my $esrc=&Apache::lonnet::declutter($hash->{'src_'.$rid});
@@ -861,7 +862,8 @@
             if ($cfile ne '') {
                 my $jscall = &Apache::lonhtmlcommon::jump_to_editres($cfile,$home,$switchserver,
                                                                      $forceedit,1,$symb,undef,
-                                                                     &escape($env{'form.title'}));
+                                                                     &escape($env{'form.title'},
+                                                                     $hostname));
                 if ($jscall) {
                     $editbutton = 1;
                     my $icon = 'pcstr.png';




More information about the LON-CAPA-cvs mailing list