MDL-46853 calendar: fix import of no duration events

This commit is contained in:
gdharris 2014-08-15 15:31:48 -04:00 committed by Eloy Lafuente (stronk7)
parent 0255780b9c
commit ee19ae694a

View File

@ -2928,7 +2928,7 @@ function calendar_add_icalendar_event($event, $courseid, $subscriptionid, $timez
$timezone;
$eventrecord->timestart = strtotime($event->properties['DTSTART'][0]->value . ' ' . $tz);
if (empty($event->properties['DTEND'])) {
$eventrecord->timeduration = 3600; // one hour if no end time specified
$eventrecord->timeduration = 0; // no duration if no end time specified
} else {
$endtz = isset($event->properties['DTEND'][0]->parameters['TZID']) ? $event->properties['DTEND'][0]->parameters['TZID'] :
$timezone;