--- loncom/interface/lonhtmlcommon.pm 2003/06/11 14:20:29 1.23
+++ loncom/interface/lonhtmlcommon.pm 2003/06/19 15:02:37 1.25
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.23 2003/06/11 14:20:29 matthew Exp $
+# $Id: lonhtmlcommon.pm,v 1.25 2003/06/19 15:02:37 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -252,6 +252,7 @@ sub get_date_from_form {
$year = $tmpyear - 1900;
}
}
+ if (($year<70) || ($year>137)) { return undef; }
if (eval(&timelocal($sec,$min,$hour,$day,$month,$year))) {
return &timelocal($sec,$min,$hour,$day,$month,$year);
} else {
@@ -719,11 +720,13 @@ sub Increment_PrgWin {
my $min = int($time_est/60);
my $sec = $time_est % 60;
$time_est = $min.' minutes';
- if ($sec > 1) {
- $time_est.= ', '.$sec.' seconds';
- } elsif ($sec > 0) {
- $time_est.= ', '.$sec.' second';
- }
+ if ($min < 10) {
+ if ($sec > 1) {
+ $time_est.= ', '.$sec.' seconds';
+ } elsif ($sec > 0) {
+ $time_est.= ', '.$sec.' second';
+ }
+ }
} else {
$time_est .= ' seconds';
}