--- loncom/homework/essayresponse.pm	2009/01/05 05:54:34	1.98
+++ loncom/homework/essayresponse.pm	2009/01/21 16:17:35	1.99
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.98 2009/01/05 05:54:34 raeburn Exp $
+# $Id: essayresponse.pm,v 1.99 2009/01/21 16:17:35 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -267,7 +267,7 @@ sub file_submission {
         }
         my $uploadedfiletypes= 
             &Apache::lonnet::EXT("resource.$part".'_'."$id.uploadedfiletypes");
-        if ($uploadedfiletypes) {
+        if ($uploadedfiletypes ne '') {
             $uploadedfiletypes=~s/[^\w\,]//g;
             $uploadedfiletypes=','.$uploadedfiletypes.',';
             foreach my $file (@submitted_files) {
@@ -281,6 +281,10 @@ sub file_submission {
                     }
                 }
             }
+        } else {
+            foreach my $file (@submitted_files) {
+                push(@acceptable_files,$file);
+            }
         }
         my $maxfilesize=&Apache::lonnet::EXT("resource.$part".'_'."$id.maxfilesize");
         if (!$maxfilesize) {