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

Zimbra ical import into Moodle fix

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • None
    • 2.6.6
    • Calendar
    • None
    • MOODLE_26_STABLE

    Description

      Below is a solution/patch that will make it so Zimbra can synchronize ical with Moodle. The problem is that Moodle does not know how to handle Zimbra's quotes around the time zone id.
      DTSTART;TZID="America/Los_Angeles":20141119T093000

      The following fixes it.

      diff --git a/lib/bennu/iCalendar_parameters.php b/lib/bennu/iCalendar_parameters.php

      index d264083..af3f5ad 100644
      --- a/lib/bennu/iCalendar_parameters.php
      +++ b/lib/bennu/iCalendar_parameters.php
      @@ -178,7 +176,7 @@ class iCalendar_parameter {
                       if(empty($value)) {
                           return false;
                       }
      -                return (strcspn($value, '";:,') == strlen($value));
      +                return (strcspn($value, ';:,') == strlen($value));
                   break;
       
                   case 'VALUE':
      @@ -227,7 +225,7 @@ class iCalendar_parameter {
       
                   // Parameters we shouldn't be messing with
                   case 'TZID':
      -                return $value;
      +                return str_replace('"', '', $value);
                   break;
               }
           }
      

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              dmonty Dean Montgomery
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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