Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Stud.IP
Commits
ba00cb55
Commit
ba00cb55
authored
2 years ago
by
Ron Lucke
Browse files
Options
Downloads
Patches
Plain Diff
fix #1687
Closes #1687 Merge request
studip/studip!1102
parent
0a237170
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/classes/JsonApi/Schemas/Courseware/Block.php
+6
-4
6 additions, 4 deletions
lib/classes/JsonApi/Schemas/Courseware/Block.php
lib/classes/JsonApi/Schemas/Courseware/Container.php
+3
-3
3 additions, 3 deletions
lib/classes/JsonApi/Schemas/Courseware/Container.php
with
9 additions
and
7 deletions
lib/classes/JsonApi/Schemas/Courseware/Block.php
+
6
−
4
View file @
ba00cb55
...
@@ -67,14 +67,16 @@ class Block extends SchemaProvider
...
@@ -67,14 +67,16 @@ class Block extends SchemaProvider
self
::
RELATIONSHIP_DATA
=>
$resource
->
container
,
self
::
RELATIONSHIP_DATA
=>
$resource
->
container
,
];
];
$relationships
[
self
::
REL_OWNER
]
=
[
$relationships
[
self
::
REL_OWNER
]
=
$resource
->
owner
?
[
self
::
RELATIONSHIP_LINKS
=>
[
self
::
RELATIONSHIP_LINKS
=>
[
Link
::
RELATED
=>
$this
->
createLinkToResource
(
$resource
->
owner
),
Link
::
RELATED
=>
$this
->
createLinkToResource
(
$resource
->
owner
),
],
],
self
::
RELATIONSHIP_DATA
=>
$resource
->
owner
,
self
::
RELATIONSHIP_DATA
=>
$resource
->
owner
,
];
]
:
[
self
::
RELATIONSHIP_DATA
=>
null
];
$relationships
[
self
::
REL_EDITOR
]
=
$resource
[
'
editor
_id'
]
$relationships
[
self
::
REL_EDITOR
]
=
$resource
->
editor
?
[
?
[
self
::
RELATIONSHIP_LINKS
=>
[
self
::
RELATIONSHIP_LINKS
=>
[
Link
::
RELATED
=>
$this
->
createLinkToResource
(
$resource
->
editor
),
Link
::
RELATED
=>
$this
->
createLinkToResource
(
$resource
->
editor
),
...
@@ -84,7 +86,7 @@ class Block extends SchemaProvider
...
@@ -84,7 +86,7 @@ class Block extends SchemaProvider
:
[
self
::
RELATIONSHIP_DATA
=>
null
];
:
[
self
::
RELATIONSHIP_DATA
=>
null
];
$relationships
[
self
::
REL_EDITBLOCKER
]
=
$resource
[
'
edit_blocker
_id'
]
$relationships
[
self
::
REL_EDITBLOCKER
]
=
$resource
->
edit_blocker
?
[
?
[
self
::
RELATIONSHIP_LINKS_SELF
=>
true
,
self
::
RELATIONSHIP_LINKS_SELF
=>
true
,
self
::
RELATIONSHIP_LINKS
=>
[
self
::
RELATIONSHIP_LINKS
=>
[
...
...
This diff is collapsed.
Click to expand it.
lib/classes/JsonApi/Schemas/Courseware/Container.php
+
3
−
3
View file @
ba00cb55
...
@@ -50,7 +50,7 @@ class Container extends SchemaProvider
...
@@ -50,7 +50,7 @@ class Container extends SchemaProvider
$relationships
=
[];
$relationships
=
[];
$relationships
=
$this
->
addBlocksRelationship
(
$relationships
,
$resource
,
$this
->
shouldInclude
(
$context
,
self
::
REL_BLOCKS
));
$relationships
=
$this
->
addBlocksRelationship
(
$relationships
,
$resource
,
$this
->
shouldInclude
(
$context
,
self
::
REL_BLOCKS
));
$relationships
[
self
::
REL_OWNER
]
=
$resource
[
'
owner
_id'
]
$relationships
[
self
::
REL_OWNER
]
=
$resource
->
owner
?
[
?
[
self
::
RELATIONSHIP_LINKS
=>
[
self
::
RELATIONSHIP_LINKS
=>
[
Link
::
RELATED
=>
$this
->
createLinkToResource
(
$resource
->
owner
),
Link
::
RELATED
=>
$this
->
createLinkToResource
(
$resource
->
owner
),
...
@@ -59,7 +59,7 @@ class Container extends SchemaProvider
...
@@ -59,7 +59,7 @@ class Container extends SchemaProvider
]
]
:
[
self
::
RELATIONSHIP_DATA
=>
$resource
->
owner
];
:
[
self
::
RELATIONSHIP_DATA
=>
$resource
->
owner
];
$relationships
[
self
::
REL_EDITOR
]
=
$resource
[
'
editor
_id'
]
$relationships
[
self
::
REL_EDITOR
]
=
$resource
->
editor
?
[
?
[
self
::
RELATIONSHIP_LINKS
=>
[
self
::
RELATIONSHIP_LINKS
=>
[
Link
::
RELATED
=>
$this
->
createLinkToResource
(
$resource
->
editor
),
Link
::
RELATED
=>
$this
->
createLinkToResource
(
$resource
->
editor
),
...
@@ -68,7 +68,7 @@ class Container extends SchemaProvider
...
@@ -68,7 +68,7 @@ class Container extends SchemaProvider
]
]
:
[
self
::
RELATIONSHIP_DATA
=>
null
];
:
[
self
::
RELATIONSHIP_DATA
=>
null
];
$relationships
[
self
::
REL_EDITBLOCKER
]
=
$resource
[
'
edit_blocker
_id'
]
$relationships
[
self
::
REL_EDITBLOCKER
]
=
$resource
->
edit_blocker
?
[
?
[
self
::
RELATIONSHIP_LINKS_SELF
=>
true
,
self
::
RELATIONSHIP_LINKS_SELF
=>
true
,
self
::
RELATIONSHIP_LINKS
=>
[
self
::
RELATIONSHIP_LINKS
=>
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment