version 1.63, 2004/04/07 22:33:00
|
version 1.66, 2004/04/19 16:43:03
|
Line 231 sub date_setter {
|
Line 231 sub date_setter {
|
} |
} |
} |
} |
# other potentially useful values: wkday,yrday,is_daylight_savings |
# 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) { |
if ($currentvalue) { |
($sec,$min,$hour,$mday,$month,$year,undef,undef,undef) = |
($sec,$min,$hour,$mday,$month,$year,undef,undef,undef) = |
localtime($currentvalue); |
localtime($currentvalue); |
Line 327 ENDJS
|
Line 327 ENDJS
|
if ($includeempty) { $result.="<option value=''></option>"; } |
if ($includeempty) { $result.="<option value=''></option>"; } |
for (my $h = 0;$h<24;$h++) { |
for (my $h = 0;$h<24;$h++) { |
$result .= " <option value=\"$h\" "; |
$result .= " <option value=\"$h\" "; |
$result .= "selected " if ($hour == $h); |
$result .= "selected " if (defined($hour) && $hour == $h); |
$result .= "> "; |
$result .= "> "; |
my $timest=''; |
my $timest=''; |
if ($h == 0) { |
if ($h == 0) { |
Line 392 sub get_date_from_form {
|
Line 392 sub get_date_from_form {
|
if (($tmpsec =~ /^\d+$/) && ($tmpsec >= 0) && ($tmpsec < 60)) { |
if (($tmpsec =~ /^\d+$/) && ($tmpsec >= 0) && ($tmpsec < 60)) { |
$sec = $tmpsec; |
$sec = $tmpsec; |
} |
} |
|
if (!defined($tmpsec) || $tmpsec eq '') { $sec = 0; } |
} |
} |
if (defined($ENV{'form.'.$dname.'_minute'})) { |
if (defined($ENV{'form.'.$dname.'_minute'})) { |
my $tmpmin = $ENV{'form.'.$dname.'_minute'}; |
my $tmpmin = $ENV{'form.'.$dname.'_minute'}; |
if (($tmpmin =~ /^\d+$/) && ($tmpmin >= 0) && ($tmpmin < 60)) { |
if (($tmpmin =~ /^\d+$/) && ($tmpmin >= 0) && ($tmpmin < 60)) { |
$min = $tmpmin; |
$min = $tmpmin; |
} |
} |
|
if (!defined($tmpmin) || $tmpmin eq '') { $min = 0; } |
} |
} |
if (defined($ENV{'form.'.$dname.'_hour'})) { |
if (defined($ENV{'form.'.$dname.'_hour'})) { |
my $tmphour = $ENV{'form.'.$dname.'_hour'}; |
my $tmphour = $ENV{'form.'.$dname.'_hour'}; |
Line 950 returns: nothing
|
Line 952 returns: nothing
|
# |
# |
# The first one should be the course, I guess. |
# The first one should be the course, I guess. |
if (!defined($menulink)) { $menulink=1; } |
if (!defined($menulink)) { $menulink=1; } |
if ($menulink && exists($ENV{'request.course.id'})) { |
if ($menulink && exists($ENV{'request.course.id'}) && $ENV{'request.course.id'} ne '') { |
my $cid = $ENV{'request.course.id'}; |
my $cid = $ENV{'request.course.id'}; |
unshift(@Crumbs,{ |
unshift(@Crumbs,{ |
href=>'/adm/menu', |
href=>'/adm/menu', |