[LON-CAPA-cvs] cvs: modules /raeburn/register registrations.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Sat, 19 Apr 2008 19:22:27 -0000
raeburn Sat Apr 19 15:22:27 2008 EDT
Modified files:
/modules/raeburn/register registrations.pm
Log:
- set time zone to America/Detroit.
- eliminate 'products' from text for "Registration/Accommodation Fees" edit action.
Index: modules/raeburn/register/registrations.pm
diff -u modules/raeburn/register/registrations.pm:1.8 modules/raeburn/register/registrations.pm:1.9
--- modules/raeburn/register/registrations.pm:1.8 Sat Apr 19 12:05:49 2008
+++ modules/raeburn/register/registrations.pm Sat Apr 19 15:22:23 2008
@@ -6,7 +6,7 @@
# privilege for an event can edit the contents of the registration
# form.
#
-# $Id: registrations.pm,v 1.8 2008/04/19 16:05:49 raeburn Exp $
+# $Id: registrations.pm,v 1.9 2008/04/19 19:22:23 raeburn Exp $
#
# Stuart P Raeburn
#
@@ -26,6 +26,7 @@
use Apache::LON::Utilities;
use Spreadsheet::WriteExcel::Simple;
use DateTime::Format::MySQL;
+use DateTime;
sub handler {
my $r = shift;
@@ -1306,7 +1307,7 @@
<form method="post" name="editmenu" action="/registrations">
<p><a href="javascript:editform('config')">Modify Overall Configuration</a><br />Location, Access Dates etc.</p>
<p><a href="javascript:editform('formfields')">Modify Form Elements</a><br />Registration data to collect</p>
-<p><a href="javascript:editform('fees')">Registration/Accommodation Fees</a><br />Configure products, fees, conditions and dependencies</p>
+<p><a href="javascript:editform('fees')">Registration/Accommodation Fees</a><br />Configure fees, conditions and dependencies</p>
<p><a href="javascript:editform('emails')">Modify Email Configuration</a><br />Configure conditional e-mails</p>
<p><a href="javascript:editform('sponsors')">Modify Sponsor Information</a><br />Upload/Replace sponsor logos and links</p>
END_OF_B
@@ -2586,6 +2587,7 @@
my $current;
if ($in->{$datetime}) {
my $dateobj = DateTime::Format::MySQL->parse_datetime($in->{$datetime});
+ $dateobj->set_time_zone( 'America/Detroit' );
$current = $dateobj->epoch;
}
$dateforms{$datetime} =
@@ -3335,10 +3337,11 @@
my $current;
if ($in->{$item}) {
my $dateobj = DateTime::Format::MySQL->parse_datetime($in->{$item});
+ $dateobj->set_time_zone( 'America/Detroit' );
$current = $dateobj->epoch;
}
if ($current ne $newval) {
- my $newdt = DateTime->from_epoch( epoch => $newval );
+ my $newdt = DateTime->from_epoch( epoch => $newval, time_zone => 'America/Detroit' );
my $newdatetime = DateTime::Format::MySQL->format_datetime($newdt);
$changes{$item} = $newdatetime;
}