[LON-CAPA-cvs] cvs: loncom /interface lonhelper.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 11 Oct 2005 21:27:45 -0000
albertel Tue Oct 11 17:27:45 2005 EDT
Modified files:
/loncom/interface lonhelper.pm
Log:
- multiple minutes appear multiple times need to pick the first one in the list
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.119 loncom/interface/lonhelper.pm:1.120
--- loncom/interface/lonhelper.pm:1.119 Tue Oct 11 17:16:37 2005
+++ loncom/interface/lonhelper.pm Tue Oct 11 17:27:44 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.119 2005/10/11 21:16:37 albertel Exp $
+# $Id: lonhelper.pm,v 1.120 2005/10/11 21:27:44 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1644,13 +1644,15 @@
$result .= "</select> :\n";
$result .= "<select $onclick name='${var}minute'>\n";
- for my $i ((0,15,30,45,59,undef,1..59)) {
+ my $selected=0;
+ for my $i ((0,15,30,45,59,undef,0..59)) {
my $printedMinute = $i;
if (defined($i) && $i < 10) {
$printedMinute = "0" . $printedMinute;
}
- if ($date->min == $i) {
+ if (!$selected && $date->min == $i) {
$result .= "<option selected='selected'>";
+ $selected=1;
} else {
$result .= "<option>";
}