[LON-CAPA-cvs] cvs: loncom /homework essayresponse.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Wed, 26 Sep 2007 00:31:25 -0000


albertel		Tue Sep 25 20:31:25 2007 EDT

  Modified files:              
    /loncom/homework	essayresponse.pm 
  Log:
  - allow ws between commas and extensions
  
  
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.83 loncom/homework/essayresponse.pm:1.84
--- loncom/homework/essayresponse.pm:1.83	Fri Aug 10 16:09:30 2007
+++ loncom/homework/essayresponse.pm	Tue Sep 25 20:31:23 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.83 2007/08/10 20:09:30 albertel Exp $
+# $Id: essayresponse.pm,v 1.84 2007/09/26 00:31:23 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -246,7 +246,7 @@
 	    $uploadedfiletypes=','.$uploadedfiletypes.',';
 	    foreach my $file (@submitted_files) {
 		my ($extension)=($file=~/\.(\w+)$/);
-		unless ($uploadedfiletypes=~/\,$extension\,/i) {
+		unless ($uploadedfiletypes=~/\,\s*\Q$extension\E\s*\,/i) {
 		    $$award='INVALID_FILETYPE';
 		}
 	    }