--- loncom/interface/lonhtmlcommon.pm 2005/05/28 00:35:47 1.105
+++ loncom/interface/lonhtmlcommon.pm 2005/06/06 15:54:28 1.107
@@ -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.107 2005/06/06 15:54:28 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -259,6 +259,7 @@ The method used to restrict user input w
sub date_setter {
my ($formname,$dname,$currentvalue,$special,$includeempty,$state,
$no_hh_mm_ss) = @_;
+ 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,10 @@ sub date_setter {
localtime($currentvalue);
$year += 1900;
}
+ unless ($wasdefined) {
+ $sec=0;
+ $min=0;
+ }
my $result = "\n\n";
$result .= <
@@ -1112,6 +1118,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 +1143,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 +1159,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);
# }