aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/JsonApi/Schemas/Courseware/Unit.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/classes/JsonApi/Schemas/Courseware/Unit.php')
-rw-r--r--lib/classes/JsonApi/Schemas/Courseware/Unit.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/classes/JsonApi/Schemas/Courseware/Unit.php b/lib/classes/JsonApi/Schemas/Courseware/Unit.php
index a1c554e..7a0bf4e 100644
--- a/lib/classes/JsonApi/Schemas/Courseware/Unit.php
+++ b/lib/classes/JsonApi/Schemas/Courseware/Unit.php
@@ -53,7 +53,7 @@ class Unit extends SchemaProvider
]
: [self::RELATIONSHIP_DATA => null];
- $relationships[self::REL_STRUCTURAL_ELEMENT] = $resource['structural_element_id']
+ $relationships[self::REL_STRUCTURAL_ELEMENT] = $resource->structural_element
? [
self::RELATIONSHIP_LINKS => [
Link::RELATED => $this->createLinkToResource($resource->structural_element),
@@ -76,4 +76,4 @@ class Unit extends SchemaProvider
return $relationships;
}
-} \ No newline at end of file
+}