From d1824682f25474c7f551e37ca57f772933513e86 Mon Sep 17 00:00:00 2001 From: Ron Lucke Date: Fri, 17 Jan 2025 14:12:34 +0000 Subject: =?UTF-8?q?=C3=84nderung=20des=20Inhaltstyps=20macht=20Aufgabe=20u?= =?UTF-8?q?nbrauchbar=20(6.0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge request studip/studip!3846 --- .../JsonApi/Routes/Courseware/StructuralElementsUpdate.php | 4 +++- .../CoursewareStructuralElementDialogSettings.vue | 11 ++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/classes/JsonApi/Routes/Courseware/StructuralElementsUpdate.php b/lib/classes/JsonApi/Routes/Courseware/StructuralElementsUpdate.php index 3b3deb0..ae58bca 100644 --- a/lib/classes/JsonApi/Routes/Courseware/StructuralElementsUpdate.php +++ b/lib/classes/JsonApi/Routes/Courseware/StructuralElementsUpdate.php @@ -120,7 +120,6 @@ class StructuralElementsUpdate extends JsonApiController 'payload', 'position', 'public', - 'purpose', 'title', 'permission-type', 'visible', @@ -136,6 +135,9 @@ class StructuralElementsUpdate extends JsonApiController $resource->$sormKey = $val; } } + if (self::arrayHas($json, 'data.attributes.purpose') && $resource->purpose !== 'task') { + $resource->purpose = self::arrayGet($json, 'data.attributes.purpose'); + } if (self::arrayHas($json, 'data.attributes.visible-all')) { $resource->visible_all = self::arrayGet($json, 'data.attributes.visible-all'); } diff --git a/resources/vue/components/courseware/structural-element/CoursewareStructuralElementDialogSettings.vue b/resources/vue/components/courseware/structural-element/CoursewareStructuralElementDialogSettings.vue index 1481926..e899bf3 100644 --- a/resources/vue/components/courseware/structural-element/CoursewareStructuralElementDialogSettings.vue +++ b/resources/vue/components/courseware/structural-element/CoursewareStructuralElementDialogSettings.vue @@ -8,7 +8,7 @@ height="560" :width="inContent ? '720' : '500'" class="studip-dialog-with-tab" - @close="$emit('close')" + @close="closeSettingsDialog" @confirm="storeCurrentElement" > -