[LON-CAPA-cvs] cvs: rat(version_2_11_X) / lonpage.pm
raeburn
raeburn at source.lon-capa.org
Mon Aug 12 11:36:40 EDT 2019
raeburn Mon Aug 12 15:36:40 2019 EDT
Modified files: (Branch: version_2_11_X)
/rat lonpage.pm
Log:
- For 2.11
Backport 1.127, 1.128
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.111.2.7 rat/lonpage.pm:1.111.2.8
--- rat/lonpage.pm:1.111.2.7 Sun Jul 28 14:10:33 2019
+++ rat/lonpage.pm Mon Aug 12 15:36:40 2019
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Page Handler
#
-# $Id: lonpage.pm,v 1.111.2.7 2019/07/28 14:10:33 raeburn Exp $
+# $Id: lonpage.pm,v 1.111.2.8 2019/08/12 15:36:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -298,23 +298,26 @@
$posthash{'rndseed'}=$env{'form.rndseed'};
$posthash{'answer_output_mode'} = $env{'form.answer_output_mode'};
}
- my $submitted=exists($env{'form.all_submit'});
+ my $submitted=$env{'form.all_submit_pressed'};
if (!$submitted) {
foreach my $key (keys(%env)) {
- if ($key=~/^form.\Q$prefix\Esubmit_/) {
- $submitted=1;last;
+ if ($key=~/^\Qform.$prefix\Esubmit_(.+)_pressed$/) {
+ if ($env{$key}) {
+ $submitted=1;
+ last;
+ }
}
- }
+ }
}
if ($submitted) {
foreach my $key (keys(%env)) {
- if ($key=~/^form.\Q$prefix\E/) {
+ if ($key=~/^\Qform.$prefix\E/) {
my $name=$key;
- $name=~s/^form.\Q$prefix\E//;
+ $name=~s/^\Qform.$prefix\E//;
$posthash{$name}=$env{$key};
- }
+ }
}
- if (exists($env{'form.all_submit'})) {
+ if ($env{'form.all_submit_pressed'}) {
$posthash{'all_submit'}='yes';
}
}
@@ -428,8 +431,6 @@
$output=~
s/(\Q<td class="LC_status_\E)(\Qsubmit_\E)([^\"]*)(\s*[^\"]*"\>)/$1$idprefix$2$3$4/g;
if ($nuploads) {
- $output=~
- s/\<(input[^\>]+name=\"\Q$prefix\EHWFILE[^\>]+)\s*id\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\)]*)\>/\<$1 id="$prefix$2" $3\>/gsi;
($turninpaths{$prefix},$multiresps{$prefix}) =
&Apache::loncommon::get_turnedin_filepath($symb,$env{'user.name'},$env{'user.domain'});
if ($turninparent eq '') {
@@ -542,7 +543,9 @@
"\n</script>\n";
}
if (($nforms) && ($nuploads)) {
- $allscript .= &Apache::lonhtmlcommon::file_submissionchk_js(\%turninpaths,\%multiresps);
+ $allscript .= &Apache::lonhtmlcommon::file_submissionchk_js(\%turninpaths,\%multiresps).
+ '<script type="text/javascript" '.
+ 'src="/res/adm/includes/file_upload.js"></script>';
}
if (($nforms) && (&Apache::lonhtmlcommon::htmlareabrowser())) {
my %textarea_args = (
@@ -743,6 +746,8 @@
$r->print(
'<input name="all_submit" value="'.&mt('Submit All').'" type="'.
(($nforms>1)?'submit':'hidden').'"'.$class.' id="all_submit" />'.
+ '<input type="hidden" name="all_submit_pressed" '.
+ 'id="all_submit_pressed" value="" />'.
'<div id="msg_all_submit" style="display:none">'.
&mt('Processing your submission ...').'</div></form>');
}
More information about the LON-CAPA-cvs
mailing list