[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 30 Jun 2006 17:42:39 -0000
albertel Fri Jun 30 13:42:39 2006 EDT
Modified files:
/loncom/homework lonhomework.pm
Log:
- time limit message wasn't correctly checking what the interval limit was
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.255 loncom/homework/lonhomework.pm:1.256
--- loncom/homework/lonhomework.pm:1.255 Fri Jun 30 01:10:29 2006
+++ loncom/homework/lonhomework.pm Fri Jun 30 13:42:38 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.255 2006/06/30 05:10:29 albertel Exp $
+# $Id: lonhomework.pm,v 1.256 2006/06/30 17:42:38 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -480,7 +480,11 @@
if (!$first_access) {
$status='NOT_YET_VIEWED';
my $due_date = &due_date($id);
- $datemsg=&seconds_to_human_length($due_date-time);
+ my $seconds_left = $due_date - time;
+ if ($seconds_left > $interval || $due_date eq '') {
+ $seconds_left = $interval;
+ }
+ $datemsg=&seconds_to_human_length($seconds_left);
}
}
}