From 894c39878fe74c36dc45e4f72b6b9f641dbe044e Mon Sep 17 00:00:00 2001 From: Torsten Simon Date: Wed, 9 Oct 2024 12:12:11 +0200 Subject: [PATCH 1/3] fix:render childobject fetch collections of parent (child can't be in a collection) --- Frontend/src/app/core-ui-module/render-helper.service.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Frontend/src/app/core-ui-module/render-helper.service.ts b/Frontend/src/app/core-ui-module/render-helper.service.ts index 09b28058f..68ae60db1 100644 --- a/Frontend/src/app/core-ui-module/render-helper.service.ts +++ b/Frontend/src/app/core-ui-module/render-helper.service.ts @@ -181,7 +181,12 @@ export class RenderHelperService { } private getCollectionsContainingNode(node: Node): Observable { - const id = this.getOriginalId(node); + let id = this.getOriginalId(node); + console.log(node); + // a childobject can never be in a collection, but its parent may + if (node.aspects?.includes(RestConstants.CCM_ASPECT_IO_CHILDOBJECT)) { + id = node.parent?.id; + } return this.networkService.isFromHomeRepository(node).pipe( switchMap((home) => { if (home) { From 59d4f018036732d1ac4d2bb66a072ee462993111 Mon Sep 17 00:00:00 2001 From: Torsten Simon Date: Wed, 9 Oct 2024 12:14:46 +0200 Subject: [PATCH 2/3] fix:render childobject fetch collections of parent (child can't be in a collection) --- Frontend/src/app/core-ui-module/render-helper.service.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/Frontend/src/app/core-ui-module/render-helper.service.ts b/Frontend/src/app/core-ui-module/render-helper.service.ts index 68ae60db1..050e1acf1 100644 --- a/Frontend/src/app/core-ui-module/render-helper.service.ts +++ b/Frontend/src/app/core-ui-module/render-helper.service.ts @@ -182,7 +182,6 @@ export class RenderHelperService { private getCollectionsContainingNode(node: Node): Observable { let id = this.getOriginalId(node); - console.log(node); // a childobject can never be in a collection, but its parent may if (node.aspects?.includes(RestConstants.CCM_ASPECT_IO_CHILDOBJECT)) { id = node.parent?.id; From 64831e8a161e04f95720fddf6786cee8601d7a0b Mon Sep 17 00:00:00 2001 From: Torsten Simon Date: Thu, 10 Oct 2024 11:18:50 +0200 Subject: [PATCH 3/3] fix:cast exception when usage was present and lti object was rendered --- .../main/java/org/edu_sharing/restservices/shared/NodeUrls.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/NodeUrls.java b/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/NodeUrls.java index ffd090ace..e3153c85f 100644 --- a/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/NodeUrls.java +++ b/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/NodeUrls.java @@ -14,7 +14,7 @@ public NodeUrls(Node node, String requestedVersion) { repositoryBaseUrl = URLHelper.getBaseUrl(true); if(node.getAspects().contains(CCConstants.getValidLocalName(CCConstants.CCM_ASPECT_LTITOOL_NODE))){ generateLtiResourceLink = repositoryBaseUrl + "/rest/ltiplatform/v13/generateLoginInitiationFormResourceLink?nodeId=" + node.getRef().getId(); - if(Context.getCurrentInstance() != null && Context.getCurrentInstance().getSessionAttribute(CCConstants.AUTH_SINGLE_USE_NODEIDS) != null){ + if(Context.getCurrentInstance() != null){ if(Context.getCurrentInstance().isSingleUseNodeId(node.getRef().getId())){ //generate short living jwt try {