Ignore:
Timestamp:
May 2, 2016, 12:09:23 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated to moodle 3.0.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • moodle/trunk/fuentes/calendar/export_execute.php

    r136 r1331  
    190190    $ev->add_property('last-modified', Bennu::timestamp_to_datetime($event->timemodified));
    191191    $ev->add_property('dtstamp', Bennu::timestamp_to_datetime()); // now
    192     $ev->add_property('dtstart', Bennu::timestamp_to_datetime($event->timestart)); // when event starts
    193192    if ($event->timeduration > 0) {
    194193        //dtend is better than duration, because it works in Microsoft Outlook and works better in Korganizer
     194        $ev->add_property('dtstart', Bennu::timestamp_to_datetime($event->timestart)); // when event starts.
    195195        $ev->add_property('dtend', Bennu::timestamp_to_datetime($event->timestart + $event->timeduration));
     196    } else {
     197        // When no duration is present, ie an all day event, VALUE should be date instead of time and dtend = dtstart + 1 day.
     198        $ev->add_property('dtstart', Bennu::timestamp_to_date($event->timestart), array('value' => 'DATE')); // All day event.
     199        $ev->add_property('dtend', Bennu::timestamp_to_date($event->timestart + DAYSECS), array('value' => 'DATE')); // All day event.
    196200    }
    197201    if ($event->courseid != 0) {
Note: See TracChangeset for help on using the changeset viewer.