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

www lon-capa-cvs@mail.lon-capa.org
Thu, 01 Sep 2005 15:23:26 -0000


www		Thu Sep  1 11:23:26 2005 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  Bug #4322: no message when only files submitted
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.281 loncom/homework/grades.pm:1.282
--- loncom/homework/grades.pm:1.281	Tue Aug 30 10:52:51 2005
+++ loncom/homework/grades.pm	Thu Sep  1 11:23:23 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.281 2005/08/30 14:52:51 albertel Exp $
+# $Id: grades.pm,v 1.282 2005/09/01 15:23:23 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -471,6 +471,10 @@
 
     $uessay=~s/\W+/ /gs;
 
+# ignore empty submissions (occuring when only files are sent)
+
+    unless ($uessay=~/\w+/) { return ''; }
+
 # these will be returned. Do not care if not at least 50 percent similar
     my $limit=0.6;
     my $sname='';