[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Fri Jan 25 19:18:48 EST 2019


raeburn		Sat Jan 26 00:18:48 2019 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - datatoken validation needs to support csv upload in domain or author context.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1324 loncom/interface/loncommon.pm:1.1325
--- loncom/interface/loncommon.pm:1.1324	Sun Nov 18 22:50:52 2018
+++ loncom/interface/loncommon.pm	Sat Jan 26 00:18:48 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1324 2018/11/18 22:50:52 raeburn Exp $
+# $Id: loncommon.pm,v 1.1325 2019/01/26 00:18:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -13937,7 +13937,7 @@
 
 sub valid_datatoken {
     my ($datatoken) = @_;
-    if ($datatoken =~ /^$match_username\_$match_domain\_enroll_$match_domain\_$match_courseid\_\d+_\d+$/) {
+    if ($datatoken =~ /^$match_username\_$match_domain\_enroll_(|$match_domain\_$match_courseid)\_\d+_\d+$/) {
         return $datatoken;
     }
     return;




More information about the LON-CAPA-cvs mailing list