--- rat/lonpage.pm 2012/11/30 20:48:20 1.99
+++ rat/lonpage.pm 2013/06/09 02:59:25 1.101
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Page Handler
#
-# $Id: lonpage.pm,v 1.99 2012/11/30 20:48:20 raeburn Exp $
+# $Id: lonpage.pm,v 1.101 2013/06/09 02:59:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -264,6 +264,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 +370,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 +434,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,
@@ -612,7 +621,9 @@ sub get_buttons {
|| !$hash->{'encrypted_'.$rid})) {
$metainfo .=''.
''.
- ''.
+ ''.
'';
}
if (($hash->{'src_'.$rid} !~ m{^/uploaded/}) &&
@@ -620,7 +631,9 @@ sub get_buttons {
$metainfo .= ''.
- ''.
+ ''.
'';
}
if (($hash->{'src_'.$rid}=~/$LONCAPA::assess_re/) &&
@@ -631,12 +644,16 @@ sub get_buttons {
''.
'&command=submission">'.
- ''.
+ ''.
''.
''.
'&command=gradingmenu">'.
- ''.
+ ''.
'';
}
if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {
@@ -644,7 +661,9 @@ sub get_buttons {
''.
'" >'.
- ''.
+ ''.
'';
}
}