[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /homework grades.pm
raeburn
raeburn at source.lon-capa.org
Tue Sep 11 10:35:57 EDT 2018
raeburn Tue Sep 11 14:35:57 2018 EDT
Modified files: (Branch: version_2_11_X)
/loncom/homework grades.pm
Log:
- For 2.11
Backport 1.742
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.596.2.12.2.42 loncom/homework/grades.pm:1.596.2.12.2.43
--- loncom/homework/grades.pm:1.596.2.12.2.42 Sun Apr 29 15:05:25 2018
+++ loncom/homework/grades.pm Tue Sep 11 14:35:56 2018
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.596.2.12.2.42 2018/04/29 15:05:25 raeburn Exp $
+# $Id: grades.pm,v 1.596.2.12.2.43 2018/09/11 14:35:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4606,8 +4606,10 @@
if (!$env{'form.datatoken'}) {
$datatoken=&Apache::loncommon::upfile_store($request);
} else {
- $datatoken=$env{'form.datatoken'};
- &Apache::loncommon::load_tmp_file($request);
+ $datatoken=&Apache::loncommon::valid_datatoken($env{'form.datatoken'});
+ if ($datatoken ne '') {
+ &Apache::loncommon::load_tmp_file($request,$datatoken);
+ }
}
my @records=&Apache::loncommon::upfile_record_sep();
if ($env{'form.noFirstLine'}) { shift(@records); }
@@ -4711,7 +4713,10 @@
my ($symb)=&get_symb($request);
if (!$symb) {return '';}
my $error_msg = '';
- &Apache::loncommon::load_tmp_file($request);
+ my $datatoken = &Apache::loncommon::valid_datatoken($env{'form.datatoken'});
+ if ($datatoken ne '') {
+ &Apache::loncommon::load_tmp_file($request,$datatoken);
+ }
my @gradedata = &Apache::loncommon::upfile_record_sep();
if ($env{'form.noFirstLine'}) { shift(@gradedata); }
my %fields=&get_fields();
More information about the LON-CAPA-cvs
mailing list