diff --git a/api/fixtures/contentTypes.yml b/api/fixtures/contentTypes.yml index 2d2fcb10fd..a620bf2ee9 100644 --- a/api/fixtures/contentTypes.yml +++ b/api/fixtures/contentTypes.yml @@ -11,6 +11,14 @@ App\Entity\ContentType: name: 'Notes' active: true entityClass: 'App\Entity\ContentNode\SingleText' + contentTypeLearningObjectives: + name: 'LearningObjectives' + active: true + entityClass: 'App\Entity\ContentNode\SingleText' + contentTypeLearningTopics: + name: 'LearningTopics' + active: true + entityClass: 'App\Entity\ContentNode\SingleText' contentTypeColumnLayout: name: 'ColumnLayout' active: true diff --git a/api/migrations/schema/Version20240416120000.php b/api/migrations/schema/Version20240416120000.php new file mode 100644 index 0000000000..1dff7dad94 --- /dev/null +++ b/api/migrations/schema/Version20240416120000.php @@ -0,0 +1,23 @@ +addSql('INSERT INTO public.content_type (id, name, active, entityclass, jsonconfig, createtime, updatetime) VALUES (\'c462edd869f3\', \'LearningObjectives\', true, \'App\Entity\ContentNode\SingleText\', \'[]\', \'2024-04-16 12:00:00\', \'2024-04-16 12:00:00\');'); + $this->addSql('INSERT INTO public.content_type (id, name, active, entityclass, jsonconfig, createtime, updatetime) VALUES (\'5e2028c55ee4\', \'LearningTopics\', true, \'App\Entity\ContentNode\SingleText\', \'[]\', \'2024-04-16 12:00:00\', \'2024-04-16 12:00:00\');'); + } + + public function down(Schema $schema): void { + $this->addSql('DELETE FROM public.content_type WHERE id IN (\'c462edd869f3\', \'5e2028c55ee4\')'); + } +} diff --git a/api/tests/Api/ContentTypes/ListContentTypesTest.php b/api/tests/Api/ContentTypes/ListContentTypesTest.php index c2ce06e21e..79cd0bf6ed 100644 --- a/api/tests/Api/ContentTypes/ListContentTypesTest.php +++ b/api/tests/Api/ContentTypes/ListContentTypesTest.php @@ -12,7 +12,7 @@ public function testListContentTypesIsAllowedForAnonymousUser() { $response = static::createBasicClient()->request('GET', '/content_types'); $this->assertResponseStatusCodeSame(200); $this->assertJsonContains([ - 'totalItems' => 8, + 'totalItems' => 10, '_links' => [ 'items' => [], ], @@ -21,14 +21,14 @@ public function testListContentTypesIsAllowedForAnonymousUser() { ], ]); - $this->assertCount(8, $response->toArray()['_links']['items']); + $this->assertCount(10, $response->toArray()['_links']['items']); } public function testListContentTypesIsAllowedForLoggedInUser() { $response = static::createClientWithCredentials()->request('GET', '/content_types'); $this->assertResponseStatusCodeSame(200); $this->assertJsonContains([ - 'totalItems' => 8, + 'totalItems' => 10, '_links' => [ 'items' => [], ], @@ -36,6 +36,6 @@ public function testListContentTypesIsAllowedForLoggedInUser() { 'items' => [], ], ]); - $this->assertCount(8, $response->toArray()['_links']['items']); + $this->assertCount(10, $response->toArray()['_links']['items']); } } diff --git a/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testGetCollectionMatchesStructure with data set content_types__1.json b/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testGetCollectionMatchesStructure with data set content_types__1.json index 1a615814cb..d8875812f3 100644 --- a/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testGetCollectionMatchesStructure with data set content_types__1.json +++ b/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testGetCollectionMatchesStructure with data set content_types__1.json @@ -92,6 +92,32 @@ "id": "escaped_value", "name": "escaped_value" }, + { + "_links": { + "contentNodes": { + "href": "escaped_value" + }, + "self": { + "href": "escaped_value" + } + }, + "active": "escaped_value", + "id": "escaped_value", + "name": "escaped_value" + }, + { + "_links": { + "contentNodes": { + "href": "escaped_value" + }, + "self": { + "href": "escaped_value" + } + }, + "active": "escaped_value", + "id": "escaped_value", + "name": "escaped_value" + }, { "_links": { "contentNodes": { @@ -130,6 +156,12 @@ { "href": "escaped_value" }, + { + "href": "escaped_value" + }, + { + "href": "escaped_value" + }, { "href": "escaped_value" } diff --git a/common/locales/de.json b/common/locales/de.json index febeb00ca1..1a6d850a58 100644 --- a/common/locales/de.json +++ b/common/locales/de.json @@ -47,6 +47,16 @@ "info": "Eine J+S Lageraktivität muss mindestens eines der aufgeführten Themen behandeln.{br}Erfasse, welche Themen in diesem Block behandelt werden.", "name": "LA Themenbereich" }, + "learningObjectives": { + "icon": "mdi-school", + "info": "Formuliere die Kompetenzen, über welche die Teilnehmenden nach diesem Block verfügen, in der Form von Lernzielen.", + "name": "Blockziele" + }, + "learningTopics": { + "icon": "mdi-school", + "info": "Liste die Ausbildungs-Themen auf, mit welchen die Teilnehmenden sich in diesem Block auseinandersetzen werden.", + "name": "Blockinhalte" + }, "material": { "info": "Hier kannst du den Material-Bedarf für diesen Block erfassen.{br}Die Materiallisten kannst du im Menu 'Admin' verwalten.{br}Eine Zusammenstellung für den Einkauf findest du im Menu 'Material'.", "name": "Material" diff --git a/common/locales/en.json b/common/locales/en.json index 9859bbfe81..2fffbf8059 100644 --- a/common/locales/en.json +++ b/common/locales/en.json @@ -49,6 +49,16 @@ "info": "A Y+S camp activity must address at least one of the listed topics.{br}Select what topics are covered in this block.", "name": "LA thematic area" }, + "learningObjectives": { + "icon": "mdi-school", + "info": "Formulate as goals the competences which the participants will have after this activity.", + "name": "Learning objectives" + }, + "learningTopics": { + "icon": "mdi-school", + "info": "List the topics about which the participants will learn something in this activity.", + "name": "Learning topics" + }, "material": { "icon": "mdi-package-variant", "info": "Here you can enter the material requirements for this block.{br}You can manage the material lists in the menu 'Admin'.{br}You can find a summary for the purchase in the menu 'Material'.", diff --git a/frontend/src/components/activity/ContentNode.vue b/frontend/src/components/activity/ContentNode.vue index 422ffc5a5e..4f152eb231 100644 --- a/frontend/src/components/activity/ContentNode.vue +++ b/frontend/src/components/activity/ContentNode.vue @@ -18,6 +18,8 @@ import ResponsiveLayout from './content/ResponsiveLayout.vue' import Notes from './content/Notes.vue' import Material from './content/Material.vue' import LAThematicArea from './content/LAThematicArea.vue' +import LearningObjectives from './content/LearningObjectives.vue' +import LearningTopics from './content/LearningTopics.vue' import SafetyConcept from './content/SafetyConcept.vue' import Storyboard from './content/Storyboard.vue' import Storycontext from './content/Storycontext.vue' @@ -28,6 +30,8 @@ const contentNodeComponents = { Notes, Material, LAThematicArea, + LearningObjectives, + LearningTopics, SafetyConcept, Storyboard, Storycontext, diff --git a/frontend/src/components/activity/content/LearningObjectives.vue b/frontend/src/components/activity/content/LearningObjectives.vue new file mode 100644 index 0000000000..84256e746a --- /dev/null +++ b/frontend/src/components/activity/content/LearningObjectives.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/frontend/src/components/activity/content/LearningTopics.vue b/frontend/src/components/activity/content/LearningTopics.vue new file mode 100644 index 0000000000..d21578735b --- /dev/null +++ b/frontend/src/components/activity/content/LearningTopics.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/pdf/src/campPrint/scheduleEntry/contentNode/ContentNode.vue b/pdf/src/campPrint/scheduleEntry/contentNode/ContentNode.vue index c2c5003065..8d71c91662 100644 --- a/pdf/src/campPrint/scheduleEntry/contentNode/ContentNode.vue +++ b/pdf/src/campPrint/scheduleEntry/contentNode/ContentNode.vue @@ -11,6 +11,8 @@ import PdfComponent from '@/PdfComponent.js' import ColumnLayout from './ColumnLayout.vue' import ResponsiveLayout from './ResponsiveLayout.vue' import LAThematicArea from './LAThematicArea.vue' +import LearningObjectives from './LearningObjectives.vue' +import LearningTopics from './LearningTopics.vue' import Storyboard from './Storyboard.vue' import Notes from './Notes.vue' import SafetyConcept from './SafetyConcept.vue' @@ -32,6 +34,8 @@ export default { ColumnLayout, ResponsiveLayout, LAThematicArea, + LearningObjectives, + LearningTopics, Storyboard, Notes, SafetyConcept, diff --git a/pdf/src/campPrint/scheduleEntry/contentNode/LearningObjectives.vue b/pdf/src/campPrint/scheduleEntry/contentNode/LearningObjectives.vue new file mode 100644 index 0000000000..5745690cce --- /dev/null +++ b/pdf/src/campPrint/scheduleEntry/contentNode/LearningObjectives.vue @@ -0,0 +1,24 @@ + + + + diff --git a/pdf/src/campPrint/scheduleEntry/contentNode/LearningTopics.vue b/pdf/src/campPrint/scheduleEntry/contentNode/LearningTopics.vue new file mode 100644 index 0000000000..cc7d9590ba --- /dev/null +++ b/pdf/src/campPrint/scheduleEntry/contentNode/LearningTopics.vue @@ -0,0 +1,24 @@ + + + + diff --git a/print/components/scheduleEntry/contentNode/ContentNode.vue b/print/components/scheduleEntry/contentNode/ContentNode.vue index 494a64429b..8381fba54d 100644 --- a/print/components/scheduleEntry/contentNode/ContentNode.vue +++ b/print/components/scheduleEntry/contentNode/ContentNode.vue @@ -30,6 +30,8 @@ import NotImplemented from './NotImplemented.vue' import ColumnLayout from './ColumnLayout.vue' import ResponsiveLayout from './ResponsiveLayout.vue' import LAThematicArea from './LAThematicArea.vue' +import LearningObjectives from './LearningObjectives.vue' +import LearningTopics from './LearningTopics.vue' import Material from './Material.vue' import Notes from './Notes.vue' import SafetyConcept from './SafetyConcept.vue' @@ -42,6 +44,8 @@ export default defineNuxtComponent({ ColumnLayout, ResponsiveLayout, LAThematicArea, + LearningObjectives, + LearningTopics, Material, Notes, SafetyConcept, diff --git a/print/components/scheduleEntry/contentNode/LearningObjectives.vue b/print/components/scheduleEntry/contentNode/LearningObjectives.vue new file mode 100644 index 0000000000..9b3b6fa1c7 --- /dev/null +++ b/print/components/scheduleEntry/contentNode/LearningObjectives.vue @@ -0,0 +1,26 @@ + + + diff --git a/print/components/scheduleEntry/contentNode/LearningTopics.vue b/print/components/scheduleEntry/contentNode/LearningTopics.vue new file mode 100644 index 0000000000..9b3b6fa1c7 --- /dev/null +++ b/print/components/scheduleEntry/contentNode/LearningTopics.vue @@ -0,0 +1,26 @@ + + +