Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-54607

Assignment due date missing time in calendar export, can be a day early or late

XMLWordPrintable

    • MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MDL-54607-master
    • Difficult
    • Hide
      1. As an admin/teacher create an assignment with due date set in Aug 10 5 PM of your timezone.
      2. Login as student and visit calendar for this course and export the calendar. During export select "Events related to this course only". You should see one event (might be more if you have other stuff in your course) that you just created. Make sure the event has bot "DTSTART" and "DTEND" properties whose value is exactly same.
      3. Import this into as many clients as possible. Try at least -
        1. Google calendar
        2. Ubuntu default calendar
        3. MS outlook
        4. MAC OSX calendar
      4. After import you should see an event exactly like the one you created, i.e with zero duration. It should not be an all day event.
      5. Import the file back into Moodle. Make sure the timestamp is exactly same for the original and imported event.
      Show
      As an admin/teacher create an assignment with due date set in Aug 10 5 PM of your timezone. Login as student and visit calendar for this course and export the calendar. During export select "Events related to this course only". You should see one event (might be more if you have other stuff in your course) that you just created. Make sure the event has bot "DTSTART" and "DTEND" properties whose value is exactly same. Import this into as many clients as possible. Try at least - Google calendar Ubuntu default calendar MS outlook MAC OSX calendar After import you should see an event exactly like the one you created, i.e with zero duration. It should not be an all day event. Import the file back into Moodle. Make sure the timestamp is exactly same for the original and imported event.
    • 3.4 Sprint 2

      Assignment due dates in the calendar ics export file do not have a time component. They are listed as an "All day" event without a timestamp. However, it has a time component in the assignment settings, and this time component is important, so students know when exactly their deadline is.

      This also causes an issue when the date specified for the due date is exported as the day before the due date. If a due date is created at 3rd May 2016 00:00, and the timezone is a UTC+ timezone (say Sydney), then in the calendar export it is specified at the 2nd May 2016 all day event. However, in the Moodle Calendar, it is shown correctly as 3rd May. When imported into an external calendar, it will be listed as 2nd May 2016, no matter what the timezone in the external system. This is because the date in the ics file is considered a 'floating time', and not a UTC timezone, as it lacks the Z designation. Check the ics spec at https://www.ietf.org/rfc/rfc2445.txt

      The same issue can make the due date a day late in a UTC- timezone.

      A UTC timestamp should be place on both the DTSTART and DTEND for assignment due date in calendar exports, which will fix both these issues.

      Example below of .ics file for due date event.

      SUMMARY:Assign 1
      DESCRIPTION:Assign 1
      CLASS:PUBLIC
      LAST-MODIFIED:20160516T002100Z
      DTSTAMP:20160516T002405Z
      DTSTART;VALUE=DATE:20160522
      DTEND;VALUE=DATE:20160523
      CATEGORIES:Calender Test
      END:VEVENT

      Reproduction of missing timestamp
      1) Create a course, create an assignment with the due date in the future
      2) Add Calendar block
      3) Login as user enrolled into course (otherwise event will not appear in .ics file)
      4) Go into Calendar and Export Calendar
      EXPECTED: Calendar entry in ics file should have time component
      ACTUAL: Listed as date only.

      Reproduction of day early date in .ics file
      1) Set timezone as Sydney for site and user
      2) Create a course, create an assignment with the due date of 3 May 2016
      3) Add Calendar block
      4) Login as user enrolled into course (otherwise event will not appear in .ics file)
      5) Go into Calendar and Export Calendar
      EXPECTED: Calendar entry in ics file should be listed as all day 3 May 2016
      ACTUAL: Calendar entry in ics file is listed as all day 2 May 2016

            ankit_frenz Ankit Agarwal
            hugh2323 Lloyd Powell
            Ryan Wyllie Ryan Wyllie
            David Monllaó David Monllaó
            Adrian Greeve Adrian Greeve
            Votes:
            11 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.