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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Sat, 10 Nov 2007 01:38:26 -0000


albertel		Fri Nov  9 20:38:26 2007 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
  Log:
  - Tim-elimits should apply even if no due date is set
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.282 loncom/homework/lonhomework.pm:1.283
--- loncom/homework/lonhomework.pm:1.282	Fri Nov  2 20:52:06 2007
+++ loncom/homework/lonhomework.pm	Fri Nov  9 20:38:21 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.282 2007/11/03 00:52:06 albertel Exp $
+# $Id: lonhomework.pm,v 1.283 2007/11/10 01:38:21 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -543,7 +543,8 @@
 	&Apache::lonxml::debug("looking for first_access $first_access");
 	if (defined($first_access)) {
 	    $interval = $first_access+$interval;
-	    $date = ($interval < $due_date)? $interval : $due_date;
+	    $date = (!$due_date || $interval < $due_date) ? $interval
+                                                          : $due_date;
 	} else {
 	    $date = $due_date;
 	}