--- rat/lonpage.pm 2013/01/15 14:14:31 1.100
+++ rat/lonpage.pm 2013/06/10 03:12:24 1.102
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Page Handler
#
-# $Id: lonpage.pm,v 1.100 2013/01/15 14:14:31 bisitz Exp $
+# $Id: lonpage.pm,v 1.102 2013/06/10 03:12:24 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -36,6 +36,7 @@ use strict;
use Apache::Constants qw(:common :http);
use Apache::lonnet;
use Apache::loncommon();
+use Apache::lonhtmlcommon;
use Apache::lonxml();
use Apache::lonlocal;
use Apache::lonmenu;
@@ -264,6 +265,7 @@ ENDEXT
my $symb=&Apache::lonnet::encode_symb($hash{'map_id_'.$mapid},$resid,$src);
my $prefix=$_.'_';
+ my $idprefix= join('_',($mapid,$resid,''));
my %posthash=('request.prefix' => $prefix,
'LONCAPA_INTERNAL_no_discussion' => 'true',
'symb' => $symb);
@@ -369,6 +371,8 @@ ENDEXT
}
$output=~
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;
if ($nuploads) {
$output=~
s/\<(input[^\>]+name=\"\Q$prefix\EHWFILE[^\>]+)\s*id\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\)]*)\>/\<$1 id="$prefix$2" $3\>/gsi;
@@ -431,6 +435,12 @@ ENDEXT
if (($nforms) && ($nuploads)) {
$allscript .= &Apache::lonhtmlcommon::file_submissionchk_js(\%turninpaths,\%multiresps);
}
+ if (($nforms) && (&Apache::lonhtmlcommon::htmlareabrowser())) {
+ my %textarea_args = (
+ dragmath => 'math',
+ );
+ $allscript .= &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args);
+ }
# ------------------------------------------------------------------ Start body
$r->print(&Apache::loncommon::start_page(undef,$allscript,
{'force_register' => 1,
@@ -480,7 +490,6 @@ ENDEXT
my $avespan=$lcm/($#colcont+1);
for ($j=0;$j<=$#colcont;$j++) {
my $rid=$colcont[$j];
-
my $metainfo =&get_buttons(\%hash,$rid).'
';
unless (($target eq 'tex') || ($target eq 'tex_answer')) {
$r->print('