24 include_once
'./Services/Calendar/classes/iCal/class.ilICalWriter.php';
25 include_once
'./Services/Calendar/classes/class.ilCalendarCategory.php';
26 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
27 include_once
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
43 $this->calendars = $a_calendar_ids;
49 $this->writer->addLine(
'BEGIN:VCALENDAR');
50 $this->writer->addLine(
'VERSION:2.0');
51 $this->writer->addLine(
'PRODID:-//ilias.de/NONSGML ILIAS Calendar V4.1//EN');
56 $this->writer->addLine(
'END:VCALENDAR');
66 foreach($this->calendars as $category_id)
73 if($app->isMilestone())
95 $this->writer->addLine(
'BEGIN:VEVENT');
98 $app->getEntryId().
'_'.CLIENT_ID.
'@'.ILIAS_HTTP_PATH));
100 #$last_mod = $app->getLastUpdate()->get(IL_CAL_FKT_DATE,'Ymd\THis\Z',ilTimeZone::UTC);
101 $last_mod = $app->getLastUpdate()->get(
IL_CAL_FKT_DATE,
'Ymd\THis\Z',$ilUser->getTimeZone());
102 $this->writer->addLine(
'LAST-MODIFIED:'.$last_mod);
104 if($app->isFullday())
110 #$start = $app->getStart()->get(IL_CAL_FKT_DATE,'Ymd\Z',ilTimeZone::UTC);
111 $start = $app->getStart()->get(
IL_CAL_FKT_DATE,
'Ymd',$ilUser->getTimeZone());
112 #$end = $app->getEnd()->get(IL_CAL_FKT_DATE,'Ymd\Z',ilTimeZone::UTC);
113 $end = $app->getEnd()->get(
IL_CAL_FKT_DATE,
'Ymd',$ilUser->getTimeZone());
115 $this->writer->addLine(
'DTSTART;VALUE=DATE:' . $start);
116 $this->writer->addLine(
'DTEND;VALUE=DATE:'.$end);
120 #$start = $app->getStart()->get(IL_CAL_FKT_DATE,'Ymd\THis\Z',ilTimeZone::UTC);
121 $start = $app->getStart()->get(
IL_CAL_FKT_DATE,
'Ymd\THis',$ilUser->getTimeZone());
122 #$end = $app->getEnd()->get(IL_CAL_FKT_DATE,'Ymd\THis\Z',ilTimeZone::UTC);
123 $end = $app->getEnd()->get(
IL_CAL_FKT_DATE,
'Ymd\THis',$ilUser->getTimeZone());
124 $this->writer->addLine(
'DTSTART;TZID='.$ilUser->getTimezone().
':'. $start);
125 $this->writer->addLine(
'DTEND;TZID='.$ilUser->getTimezone().
':'.$end);
132 if(strlen($app->getDescription()))
134 if(strlen($app->getLocation()))
140 $this->writer->addLine(
'END:VEVENT');
146 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrences.php';
151 $this->writer->addLine($excl->toICal());
153 $this->writer->addLine($rec->toICal());
160 return $this->writer->__toString();
176 $this->writer->addLine(
'URL;VALUE=URI:'.ILIAS_HTTP_PATH);
182 include_once
'./classes/class.ilLink.php';
183 $this->writer->addLine(