[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface slotrequest.pm

raeburn raeburn at source.lon-capa.org
Fri Sep 14 17:06:22 EDT 2018


raeburn		Fri Sep 14 21:06:22 2018 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	slotrequest.pm 
  Log:
  - For 2.11
    Backport 1.135
  
  
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.125.2.5 loncom/interface/slotrequest.pm:1.125.2.6
--- loncom/interface/slotrequest.pm:1.125.2.5	Sun Sep  2 02:22:09 2018
+++ loncom/interface/slotrequest.pm	Fri Sep 14 21:06:22 2018
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler for requesting to have slots added to a students record
 #
-# $Id: slotrequest.pm,v 1.125.2.5 2018/09/02 02:22:09 raeburn Exp $
+# $Id: slotrequest.pm,v 1.125.2.6 2018/09/14 21:06:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2672,8 +2672,10 @@
     if (!$env{'form.datatoken'}) {
 	$datatoken=&Apache::loncommon::upfile_store($r);
     } else {
-	$datatoken=$env{'form.datatoken'};
-	&Apache::loncommon::load_tmp_file($r);
+        $datatoken=&Apache::loncommon::valid_datatoken($env{'form.datatoken'});
+        if ($datatoken ne '') {
+            &Apache::loncommon::load_tmp_file($r,$datatoken);
+        }
     }
     my @records=&Apache::loncommon::upfile_record_sep();
     if ($env{'form.noFirstLine'}) { shift(@records); }
@@ -2723,7 +2725,10 @@
 
 sub csv_upload_assign {
     my ($r,$mgr)= @_;
-    &Apache::loncommon::load_tmp_file($r);
+    my $datatoken = &Apache::loncommon::valid_datatoken($env{'form.datatoken'});
+    if ($datatoken ne '') {
+        &Apache::loncommon::load_tmp_file($r,$datatoken);
+    }
     my @slotdata = &Apache::loncommon::upfile_record_sep();
     if ($env{'form.noFirstLine'}) { shift(@slotdata); }
     my %fields=&Apache::grades::get_fields();




More information about the LON-CAPA-cvs mailing list