--- rat/lonpage.pm 2016/10/29 05:49:28 1.120 +++ rat/lonpage.pm 2017/02/22 22:10:20 1.122 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.120 2016/10/29 05:49:28 raeburn Exp $ +# $Id: lonpage.pm,v 1.122 2017/02/22 22:10:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -185,6 +185,7 @@ sub handler { 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}; @@ -746,7 +747,7 @@ ENDEXT my $avespan=$lcm/($#colcont+1); for ($j=0;$j<=$#colcont;$j++) { my $rid=$colcont[$j]; - my $metainfo =&get_buttons(\%hash,$rid,\%buttonshide).'
'; + my $metainfo =&get_buttons(\%hash,$rid,\%buttonshide,$hostname).'
'; unless (($target eq 'tex') || ($target eq 'tex_answer')) { $r->print('{'src_'.$rid}); @@ -953,7 +954,8 @@ sub get_buttons { 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) { my $icon = 'pcstr.png'; my $label = &mt('Edit');