diff --git a/components/ILIAS/Calendar/classes/iCal/class.ilICalParser.php b/components/ILIAS/Calendar/classes/iCal/class.ilICalParser.php index 941bb60bc7ce..4d29641e17e8 100755 --- a/components/ILIAS/Calendar/classes/iCal/class.ilICalParser.php +++ b/components/ILIAS/Calendar/classes/iCal/class.ilICalParser.php @@ -1,7 +1,5 @@ @@ -393,6 +392,17 @@ protected function writeEvent(): void } $entry->save(); + // Search exclusions + // Only possible after entry is saved, otherwise the id is not available + foreach ($this->getContainer()->getItemsByName('EXDATE', false) as $item) { + if (is_a($item, 'ilICalProperty')) { + $rec_exclusion = new ilCalendarRecurrenceExclusion(); + $rec_exclusion->setEntryId($entry->getEntryId()); + $rec_exclusion->setDate(new ilDate($item->getValue(), IL_CAL_DATE)); + $rec_exclusion->save(); + } + } + $ass = new ilCalendarCategoryAssignments($entry->getEntryId()); $ass->addAssignment($this->category->getCategoryID());