--- rat/lonpage.pm 2020/06/03 11:24:55 1.120.2.3
+++ rat/lonpage.pm 2019/08/11 12:27:15 1.127
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Page Handler
#
-# $Id: lonpage.pm,v 1.120.2.3 2020/06/03 11:24:55 raeburn Exp $
+# $Id: lonpage.pm,v 1.127 2019/08/11 12:27:15 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -42,6 +42,7 @@ use Apache::lonlocal;
use Apache::lonmenu;
use Apache::lonhomework;
use Apache::lonparmset;
+use Apache::lonenc();
use HTML::TokeParser;
use GDBM_File;
use Apache::lonsequence;
@@ -185,6 +186,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};
@@ -323,7 +325,7 @@ ENDEXT
} elsif ($cellemb{$_} eq 'ssi') {
# --------------------------------------------------------- This is an SSI cell
my $prefix='p_'.$_.'_';
- my $idprefix='p_'.join('_',($mapid,$resid,''));
+ my $idprefix= 'p_'.join('_',($mapid,$resid,''));
my %posthash=('request.prefix' => $prefix,
'LONCAPA_INTERNAL_no_discussion' => 'true',
'symb' => $symb);
@@ -349,21 +351,16 @@ ENDEXT
}
if ($submitted) {
foreach my $key (keys(%env)) {
- if ($key=~/^\Qform.$prefix\E/) {
+ if ($key=~/^\Qform.$prefix\E/) {
my $name=$key;
- $name=~s/^\Qform.$prefix\E//;
+ $name=~s/^\Qform.$prefix\E//;
$posthash{$name}=$env{$key};
}
}
if ($env{'form.all_submit_pressed'}) {
$posthash{'all_submit'}='yes';
}
- } elsif ($env{'form.'.$prefix.'markaccess'} eq 'yes') {
- $posthash{'markaccess'} = $env{'form.'.$prefix.'markaccess'};
- }
- if ($env{'environment.remote'} eq 'on') {
- $posthash{'inhibitmenu'} = 'yes';
- }
+ }
my $output=Apache::lonnet::ssi($src,%posthash);
$output=~s|//(\s*)?\s||gs;
if (($target eq 'tex') || ($target eq 'tex_answer')) {
@@ -754,7 +751,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('