aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2025-05-16 14:34:11 +0200
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2025-05-16 14:34:11 +0200
commit17419d248082ca4d35e0c72e3e20679c5e9b3f88 (patch)
tree10bae7d339564f95ef0fc7da97663f73c67d02e3 /lib
parent08c91eed1ccd3751938a7db17c036a948a2d6493 (diff)
add attribute 'is-cancelled' for course date schema that allows distinguishing...
Merge request studip/studip!4223
Diffstat (limited to 'lib')
-rw-r--r--lib/classes/JsonApi/Schemas/CourseEvent.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/classes/JsonApi/Schemas/CourseEvent.php b/lib/classes/JsonApi/Schemas/CourseEvent.php
index 77f1d31..47af66d 100644
--- a/lib/classes/JsonApi/Schemas/CourseEvent.php
+++ b/lib/classes/JsonApi/Schemas/CourseEvent.php
@@ -24,7 +24,7 @@ class CourseEvent extends SchemaProvider
'end' => date('c', $resource->getEnd()),
'categories' => array_filter($resource->toStringCategories(true)),
'location' => $resource->getLocation(),
-
+ 'is-cancelled' => $resource instanceof \CourseExDate,
'mkdate' => date('c', $resource->mkdate),
'chdate' => date('c', $resource->chdate),
'recurrence' => $resource->getRecurrence(),