--- rat/lonpage.pm 2016/10/29 13:47:21 1.111.2.4 +++ rat/lonpage.pm 2018/03/01 13:25:46 1.111.2.5 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.111.2.4 2016/10/29 13:47:21 raeburn Exp $ +# $Id: lonpage.pm,v 1.111.2.5 2018/03/01 13:25:46 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -282,8 +282,8 @@ ENDEXT } } elsif ($cellemb{$_} eq 'ssi') { # --------------------------------------------------------- This is an SSI cell - my $prefix=$_.'_'; - my $idprefix= join('_',($mapid,$resid,'')); + my $prefix='p_'.$_.'_'; + my $idprefix='p_'.join('_',($mapid,$resid,'')); my %posthash=('request.prefix' => $prefix, 'LONCAPA_INTERNAL_no_discussion' => 'true', 'symb' => $symb); @@ -405,6 +405,8 @@ ENDEXT s/\<((?:input|select|button|textarea)[^\>]+)name\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\>]*)\>/\<$1 name="$prefix$2" $3\>/gsi; $output=~ s/\<((?:input|select|button|textarea)[^\>]+)id\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\>]*)\>/\<$1 id="$idprefix$2" $3\>/gsi; + $output=~ + s/(\Qthis.form.elements['\E)(HW(?:VAL|CHK)_[^']+\'\]\.(?:value=\'|checked))/$1$prefix$2/gsi; if ($hastimer) { $output=~ s/\<(input[^\>]+name=\Q"$prefix\Eaccessbutton"[^\>]+)(?:\Qdocument.markaccess.submit();\E)([^\>]*)\>/\<$1pageTimer(this.form,'$prefix')$2\>/gsi;