[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 16 Apr 2004 15:06:57 -0000
albertel Fri Apr 16 11:06:57 2004 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm
Log:
- if no date is specified, default the hour field to show nothing not 12 am
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.64 loncom/interface/lonhtmlcommon.pm:1.65
--- loncom/interface/lonhtmlcommon.pm:1.64 Mon Apr 12 16:03:31 2004
+++ loncom/interface/lonhtmlcommon.pm Fri Apr 16 11:06:56 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.64 2004/04/12 20:03:31 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.65 2004/04/16 15:06:56 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -231,7 +231,7 @@
}
}
# other potentially useful values: wkday,yrday,is_daylight_savings
- my ($sec,$min,$hour,$mday,$month,$year)=('','','','','','');
+ my ($sec,$min,$hour,$mday,$month,$year)=('','',undef,'','','');
if ($currentvalue) {
($sec,$min,$hour,$mday,$month,$year,undef,undef,undef) =
localtime($currentvalue);
@@ -327,7 +327,7 @@
if ($includeempty) { $result.="<option value=''></option>"; }
for (my $h = 0;$h<24;$h++) {
$result .= " <option value=\"$h\" ";
- $result .= "selected " if ($hour == $h);
+ $result .= "selected " if (defined($hour) && $hour == $h);
$result .= "> ";
my $timest='';
if ($h == 0) {