--- loncom/interface/lonhtmlcommon.pm 2005/05/28 00:35:47 1.105 +++ loncom/interface/lonhtmlcommon.pm 2005/06/14 02:33:18 1.108 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.105 2005/05/28 00:35:47 www Exp $ +# $Id: lonhtmlcommon.pm,v 1.108 2005/06/14 02:33:18 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -258,7 +258,8 @@ The method used to restrict user input w ############################################## sub date_setter { my ($formname,$dname,$currentvalue,$special,$includeempty,$state, - $no_hh_mm_ss) = @_; + $no_hh_mm_ss,$defhour,$defmin,$defsec) = @_; + my $wasdefined=1; if (! defined($state) || $state ne 'disabled') { $state = ''; } @@ -268,6 +269,7 @@ sub date_setter { if (! defined($currentvalue) || $currentvalue eq 'now') { unless ($includeempty) { $currentvalue = time; + $wasdefined=0; } else { $currentvalue = 0; } @@ -279,6 +281,11 @@ sub date_setter { localtime($currentvalue); $year += 1900; } + unless ($wasdefined) { + $sec=($defsec?$defsec:0); + $min=($defmin?$defmin:0); + $hour=($defhour?$defhour:0); + } my $result = "\n\n"; $result .= < @@ -1112,6 +1119,7 @@ returns: nothing # Make the faq and bug data cascade my $faq = ''; my $bug = ''; + my $help=''; # The last breadcrumb does not have a link, so handle it separately. my $last = pop(@Crumbs); # @@ -1136,6 +1144,7 @@ returns: nothing map { $faq = $_->{'faq'} if (exists($_->{'faq'})); $bug = $_->{'bug'} if (exists($_->{'bug'})); + $help = $_->{'help'} if (exists($_->{'help'})); my $result = '{'target'}) && $_->{'target'} ne '') { $result .= 'target="'.$_->{'target'}.'" '; @@ -1151,6 +1160,8 @@ returns: nothing my $icons = ''; $faq = $last->{'faq'} if (exists($last->{'faq'})); $bug = $last->{'bug'} if (exists($last->{'bug'})); + $help = $last->{'help'} if (exists($last->{'help'})); + $component_help=($component_help?$component_help:$help); # if ($faq ne '') { # $icons .= &Apache::loncommon::help_open_faq($faq); # }