Skip to content
Snippets Groups Projects
Commit 50d08828 authored by André Noack's avatar André Noack
Browse files

Resolve #3837 "ICAL Export fehlt das UID Attribut"

Closes #3837

Merge request studip/studip!2704
parent fab89ec2
No related branches found
No related tags found
No related merge requests found
...@@ -149,7 +149,8 @@ class ICalendarExport ...@@ -149,7 +149,8 @@ class ICalendarExport
'count' => $date->number_of_dates, 'count' => $date->number_of_dates,
'expire' => $date->repetition_end, 'expire' => $date->repetition_end,
'month' => $date->month 'month' => $date->month
] ],
'UID' => $date->unique_id
]; ];
} }
...@@ -159,17 +160,24 @@ class ICalendarExport ...@@ -159,17 +160,24 @@ class ICalendarExport
*/ */
public function prepareCourseDate($date): array public function prepareCourseDate($date): array
{ {
$summary = $date->course->getFullName();
$categories = $date->getTypeName();
if ($date instanceof CourseExDate) {
$summary .= ' ' . _('(fällt aus)');
$categories = '';
}
return [ return [
'SUMMARY' => $date->course->getFullName(), 'SUMMARY' => $summary,
'DESCRIPTION' => '', 'DESCRIPTION' => '',
'LOCATION' => $date->getRoomName(), 'LOCATION' => $date->getRoomName(),
'CATEGORIES' => $GLOBALS['TERMIN_TYP'][$date->date_typ]['name'], 'CATEGORIES' => $categories,
'LAST-MODIFIED' => $date->chdate, 'LAST-MODIFIED' => $date->chdate,
'CREATED' => $date->mkdate, 'CREATED' => $date->mkdate,
'DTSTAMP' => $this->time, 'DTSTAMP' => $this->time,
'DTSTART' => $date->date, 'DTSTART' => $date->date,
'DTEND' => $date->end_time, 'DTEND' => $date->end_time,
'PRIORITY' => '' 'PRIORITY' => '',
'UID' => 'Stud.IP-SEM-' . $date->id . '@' . ($_SERVER['SERVER_NAME'] ?? '')
]; ];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment