From c9a5fd573cbb6bf76853adab7571824196ff4898 Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Sat, 5 Nov 2022 17:53:23 +0100 Subject: [PATCH] Add learning module --- .../learnpath/create_default_learning_path.py | 2 +- server/vbv_lernwelt/learnpath/models.py | 2 ++ .../learnpath/models_learning_unit_content.py | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/server/vbv_lernwelt/learnpath/create_default_learning_path.py b/server/vbv_lernwelt/learnpath/create_default_learning_path.py index 34b19275..fe3d6501 100644 --- a/server/vbv_lernwelt/learnpath/create_default_learning_path.py +++ b/server/vbv_lernwelt/learnpath/create_default_learning_path.py @@ -276,7 +276,7 @@ wichtige Grundlage für eine erfolgreiche Beziehung. VideoBlockFactory( url="https://onedrive.live.com/embed?cid=26E4A934B79DCE5E&resid=26E4A934B79DCE5E%2153350&authkey=AId6i7z_X8l2fHw", description="In dieser Circle zeigt dir ein Fachexperte anhand von Kundensituationen, wie du erfolgreich" - "den Kundenbedarf ermitteln, analysieren, priorisieren und anschliessend zusammenfassen kannst.", + "den Kundenbedarf ermitteln, analysieren, priorisieren und anschliessend zusammenfassen kannst.", ), ) ], diff --git a/server/vbv_lernwelt/learnpath/models.py b/server/vbv_lernwelt/learnpath/models.py index fa53492b..bdef9301 100644 --- a/server/vbv_lernwelt/learnpath/models.py +++ b/server/vbv_lernwelt/learnpath/models.py @@ -15,6 +15,7 @@ from vbv_lernwelt.learnpath.models_learning_unit_content import ( BookBlock, DocumentBlock, ExerciseBlock, + LearningModuleBlock, MediaLibraryBlock, OnlineTrainingBlock, PlaceholderBlock, @@ -286,6 +287,7 @@ class LearningContent(Page): ("video", VideoBlock()), ("resource", ResourceBlock()), ("exercise", ExerciseBlock()), + ("learningmodule", LearningModuleBlock()), ("online_training", OnlineTrainingBlock()), ("media_library", MediaLibraryBlock()), ("document", DocumentBlock()), diff --git a/server/vbv_lernwelt/learnpath/models_learning_unit_content.py b/server/vbv_lernwelt/learnpath/models_learning_unit_content.py index 5926a272..721bf242 100644 --- a/server/vbv_lernwelt/learnpath/models_learning_unit_content.py +++ b/server/vbv_lernwelt/learnpath/models_learning_unit_content.py @@ -34,6 +34,14 @@ class ExerciseBlock(blocks.StructBlock): icon = "media" +class LearningModuleBlock(blocks.StructBlock): + description = blocks.TextBlock() + url = blocks.TextBlock() + + class Meta: + icon = "media" + + class MediaLibraryBlock(blocks.StructBlock): description = blocks.TextBlock() url = blocks.TextBlock()