Merged in feature/VBV-360-document-list (pull request #109)
Feature/VBV-360 document list
This commit is contained in:
commit
4a22005944
|
|
@ -1,5 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import LearningContentContainer from "@/pages/learningPath/learningContentPage/LearningContentContainer.vue";
|
import LearningContentContainer from "@/pages/learningPath/learningContentPage/LearningContentContainer.vue";
|
||||||
|
import DocumentListBlock from "@/pages/learningPath/learningContentPage/blocks/DocumentListBlock.vue";
|
||||||
|
import TestBlock from "@/pages/learningPath/learningContentPage/blocks/TestBlock.vue";
|
||||||
import { useCircleStore } from "@/stores/circle";
|
import { useCircleStore } from "@/stores/circle";
|
||||||
import type { LearningContent, LearningContentType } from "@/types";
|
import type { LearningContent, LearningContentType } from "@/types";
|
||||||
import eventBus from "@/utils/eventBus";
|
import eventBus from "@/utils/eventBus";
|
||||||
|
|
@ -27,12 +29,13 @@ log.debug("LearningContentParent setup", props.learningContent);
|
||||||
const COMPONENTS: Record<LearningContentType, Component> = {
|
const COMPONENTS: Record<LearningContentType, Component> = {
|
||||||
"learnpath.LearningContentAssignment": AssignmentBlock,
|
"learnpath.LearningContentAssignment": AssignmentBlock,
|
||||||
"learnpath.LearningContentAttendanceCourse": AttendanceCourseBlock,
|
"learnpath.LearningContentAttendanceCourse": AttendanceCourseBlock,
|
||||||
|
"learnpath.LearningContentDocumentList": DocumentListBlock,
|
||||||
"learnpath.LearningContentFeedback": FeedbackBlock,
|
"learnpath.LearningContentFeedback": FeedbackBlock,
|
||||||
"learnpath.LearningContentLearningModule": IframeBlock,
|
"learnpath.LearningContentLearningModule": IframeBlock,
|
||||||
"learnpath.LearningContentMediaLibrary": MediaLibraryBlock,
|
"learnpath.LearningContentMediaLibrary": MediaLibraryBlock,
|
||||||
"learnpath.LearningContentPlaceholder": PlaceholderBlock,
|
"learnpath.LearningContentPlaceholder": PlaceholderBlock,
|
||||||
"learnpath.LearningContentRichText": RichTextBlock,
|
"learnpath.LearningContentRichText": RichTextBlock,
|
||||||
"learnpath.LearningContentTest": IframeBlock,
|
"learnpath.LearningContentTest": TestBlock,
|
||||||
"learnpath.LearningContentVideo": VideoBlock,
|
"learnpath.LearningContentVideo": VideoBlock,
|
||||||
};
|
};
|
||||||
const DEFAULT_BLOCK = PlaceholderBlock;
|
const DEFAULT_BLOCK = PlaceholderBlock;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import MediaLink from "@/components/mediaLibrary/MediaLink.vue";
|
||||||
|
import type { LearningContentDocumentList } from "@/types";
|
||||||
|
import LearningContentSimpleLayout from "../layouts/LearningContentSimpleLayout.vue";
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
content: LearningContentDocumentList;
|
||||||
|
}>();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<LearningContentSimpleLayout :title="content.title" :learning-content="props.content">
|
||||||
|
<div class="container-medium">
|
||||||
|
<div class="lg:mt-8">
|
||||||
|
<div class="my-4">
|
||||||
|
<!-- eslint-disable vue/no-v-html -->
|
||||||
|
<p v-if="content.description" v-html="content.description"></p>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<ul class="border-t">
|
||||||
|
<li
|
||||||
|
v-for="item in content.documents"
|
||||||
|
:key="item.id"
|
||||||
|
class="flex items-center justify-between border-b py-4"
|
||||||
|
>
|
||||||
|
<div class="flex items-center justify-between">
|
||||||
|
<div v-if="item.value.icon_url">
|
||||||
|
<img class="mr-6 max-h-[70px]" :src="item.value.icon_url" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4 class="text-bold">{{ item.value.title }}</h4>
|
||||||
|
<p v-if="item.value.description" class="mb-2">
|
||||||
|
{{ item.value.description }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<MediaLink
|
||||||
|
:to="item.value.url"
|
||||||
|
:blank="item.value.open_window"
|
||||||
|
class="link"
|
||||||
|
>
|
||||||
|
{{ item.value.link_display_text }}
|
||||||
|
</MediaLink>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</LearningContentSimpleLayout>
|
||||||
|
</template>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import ItCheckbox from "@/components/ui/ItCheckbox.vue";
|
||||||
|
import LearningContentSimpleLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentSimpleLayout.vue";
|
||||||
|
import type { LearningContentTest } from "@/types";
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
content: LearningContentTest;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const checked = ref(false);
|
||||||
|
|
||||||
|
function toggleChecked() {
|
||||||
|
checked.value = !checked.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
window.open(props.content.content_url, "_blank");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<LearningContentSimpleLayout
|
||||||
|
:title="props.content.title"
|
||||||
|
:learning-content="props.content"
|
||||||
|
>
|
||||||
|
<!-- eslint-disable vue/no-v-html -->
|
||||||
|
<div class="container-medium">
|
||||||
|
<p
|
||||||
|
v-if="props.content.description"
|
||||||
|
class="default-wagtail-rich-text text-large my-4"
|
||||||
|
v-html="props.content.description"
|
||||||
|
></p>
|
||||||
|
|
||||||
|
<div class="my-8">
|
||||||
|
<ItCheckbox
|
||||||
|
v-if="props.content.checkbox_text"
|
||||||
|
:checkbox-item="{
|
||||||
|
label: props.content.checkbox_text,
|
||||||
|
value: checked,
|
||||||
|
checked: checked,
|
||||||
|
}"
|
||||||
|
@toggle="toggleChecked()"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="my-8">
|
||||||
|
<button
|
||||||
|
:disabled="!checked"
|
||||||
|
class="btn-primary inline-flex items-center"
|
||||||
|
@click="startTest()"
|
||||||
|
>
|
||||||
|
Test starten
|
||||||
|
<it-icon-external-link class="it-icon ml-2 h-5 w-5"></it-icon-external-link>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</LearningContentSimpleLayout>
|
||||||
|
</template>
|
||||||
|
|
@ -14,11 +14,13 @@ import type {
|
||||||
import groupBy from "lodash/groupBy";
|
import groupBy from "lodash/groupBy";
|
||||||
import partition from "lodash/partition";
|
import partition from "lodash/partition";
|
||||||
import values from "lodash/values";
|
import values from "lodash/values";
|
||||||
|
import log from "loglevel";
|
||||||
|
|
||||||
function isLearningContentType(object: any): object is LearningContent {
|
function isLearningContentType(object: any): object is LearningContent {
|
||||||
return (
|
return (
|
||||||
object?.content_type === "learnpath.LearningContentAssignment" ||
|
object?.content_type === "learnpath.LearningContentAssignment" ||
|
||||||
object?.content_type === "learnpath.LearningContentAttendanceCourse" ||
|
object?.content_type === "learnpath.LearningContentAttendanceCourse" ||
|
||||||
|
object?.content_type === "learnpath.LearningContentDocumentList" ||
|
||||||
object?.content_type === "learnpath.LearningContentFeedback" ||
|
object?.content_type === "learnpath.LearningContentFeedback" ||
|
||||||
object?.content_type === "learnpath.LearningContentLearningModule" ||
|
object?.content_type === "learnpath.LearningContentLearningModule" ||
|
||||||
object?.content_type === "learnpath.LearningContentMediaLibrary" ||
|
object?.content_type === "learnpath.LearningContentMediaLibrary" ||
|
||||||
|
|
@ -83,6 +85,7 @@ export function parseLearningSequences(
|
||||||
|
|
||||||
learningUnit.learningContents.push(child);
|
learningUnit.learningContents.push(child);
|
||||||
} else {
|
} else {
|
||||||
|
log.error("Unknown CircleChild found...", child);
|
||||||
throw new Error("Unknown CircleChild found...");
|
throw new Error("Unknown CircleChild found...");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ export interface CircleLight {
|
||||||
export type LearningContent =
|
export type LearningContent =
|
||||||
| LearningContentAssignment
|
| LearningContentAssignment
|
||||||
| LearningContentAttendanceCourse
|
| LearningContentAttendanceCourse
|
||||||
|
| LearningContentDocumentList
|
||||||
| LearningContentFeedback
|
| LearningContentFeedback
|
||||||
| LearningContentLearningModule
|
| LearningContentLearningModule
|
||||||
| LearningContentMediaLibrary
|
| LearningContentMediaLibrary
|
||||||
|
|
@ -55,6 +56,17 @@ export interface LearningContentAttendanceCourse extends LearningContentInterfac
|
||||||
readonly content_type: "learnpath.LearningContentAttendanceCourse";
|
readonly content_type: "learnpath.LearningContentAttendanceCourse";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LearningContentDocument {
|
||||||
|
readonly type: "document";
|
||||||
|
readonly id: string;
|
||||||
|
readonly value: MediaLibraryContentBlockValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LearningContentDocumentList extends LearningContentInterface {
|
||||||
|
readonly content_type: "learnpath.LearningContentDocumentList";
|
||||||
|
readonly documents: LearningContentDocument[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface LearningContentFeedback extends LearningContentInterface {
|
export interface LearningContentFeedback extends LearningContentInterface {
|
||||||
readonly content_type: "learnpath.LearningContentFeedback";
|
readonly content_type: "learnpath.LearningContentFeedback";
|
||||||
}
|
}
|
||||||
|
|
@ -73,11 +85,12 @@ export interface LearningContentPlaceholder extends LearningContentInterface {
|
||||||
|
|
||||||
export interface LearningContentRichText extends LearningContentInterface {
|
export interface LearningContentRichText extends LearningContentInterface {
|
||||||
readonly content_type: "learnpath.LearningContentRichText";
|
readonly content_type: "learnpath.LearningContentRichText";
|
||||||
text: string;
|
readonly text: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LearningContentTest extends LearningContentInterface {
|
export interface LearningContentTest extends LearningContentInterface {
|
||||||
readonly content_type: "learnpath.LearningContentTest";
|
readonly content_type: "learnpath.LearningContentTest";
|
||||||
|
readonly checkbox_text: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LearningContentVideo extends LearningContentInterface {
|
export interface LearningContentVideo extends LearningContentInterface {
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ export function learningContentTypeData(
|
||||||
}
|
}
|
||||||
case "learnpath.LearningContentAttendanceCourse":
|
case "learnpath.LearningContentAttendanceCourse":
|
||||||
return { title: "Präsenzkurs", icon: "it-icon-lc-training" };
|
return { title: "Präsenzkurs", icon: "it-icon-lc-training" };
|
||||||
|
case "learnpath.LearningContentDocumentList":
|
||||||
|
return { title: "Dokumente", icon: "it-icon-lc-document" };
|
||||||
case "learnpath.LearningContentLearningModule":
|
case "learnpath.LearningContentLearningModule":
|
||||||
return { title: "Lernmodul", icon: "it-icon-lc-learning-module" };
|
return { title: "Lernmodul", icon: "it-icon-lc-learning-module" };
|
||||||
case "learnpath.LearningContentMediaLibrary":
|
case "learnpath.LearningContentMediaLibrary":
|
||||||
|
|
@ -42,5 +44,7 @@ export function learningContentTypeData(
|
||||||
return { title: "In Umsetzung", icon: "it-icon-lc-document" };
|
return { title: "In Umsetzung", icon: "it-icon-lc-document" };
|
||||||
}
|
}
|
||||||
|
|
||||||
return assertUnreachable();
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
|
return assertUnreachable(`did not handle ${lc.content_type}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
export function assertUnreachable(): never {
|
export function assertUnreachable(msg: string): never {
|
||||||
throw new Error("Didn't expect to get here");
|
throw new Error("Didn't expect to get here, " + msg);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ from wagtail.blocks.list_block import ListBlock, ListValue
|
||||||
from wagtail.rich_text import RichText
|
from wagtail.rich_text import RichText
|
||||||
|
|
||||||
|
|
||||||
def create_uk_casework(course_id=COURSE_UK):
|
def create_uk_fahrzeug_casework(course_id=COURSE_UK):
|
||||||
assignment_list_page = (
|
assignment_list_page = (
|
||||||
CoursePage.objects.get(course_id=course_id)
|
CoursePage.objects.get(course_id=course_id)
|
||||||
.get_children()
|
.get_children()
|
||||||
|
|
@ -465,7 +465,7 @@ def create_uk_casework(course_id=COURSE_UK):
|
||||||
return assignment
|
return assignment
|
||||||
|
|
||||||
|
|
||||||
def create_uk_prep_assignment(course_id=COURSE_UK):
|
def create_uk_fahrzeug_prep_assignment(course_id=COURSE_UK):
|
||||||
assignment_list_page = (
|
assignment_list_page = (
|
||||||
CoursePage.objects.get(course_id=course_id)
|
CoursePage.objects.get(course_id=course_id)
|
||||||
.get_children()
|
.get_children()
|
||||||
|
|
@ -489,7 +489,7 @@ def create_uk_prep_assignment(course_id=COURSE_UK):
|
||||||
<li>d2pv.ük4: Sie erläutern die Prozesse und Abläufe im privaten Versicherungsbereich. (K2)</li>
|
<li>d2pv.ük4: Sie erläutern die Prozesse und Abläufe im privaten Versicherungsbereich. (K2)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Handlungskompetenz e4: Betriebsbezogene Inhalte multimedial aufbereiten<br/>
|
Handlungskompetenz e4: Betriebsbezogene Inhalte multimedial aufbereiten<br/>
|
||||||
Arbeitssituation 1: Charakteristiken der Branche und Stärken des Betriebs einbringen<br/>
|
Arbeitssituation 1: Charakteristiken der Branche und Stärken des Betriebs einbringen<br/>
|
||||||
|
|
@ -499,10 +499,10 @@ def create_uk_prep_assignment(course_id=COURSE_UK):
|
||||||
<li>e4.pv.ük4: Sie erläutern die Grundlagen der Produkte von Privatversicherungen. (K2)</li>
|
<li>e4.pv.ük4: Sie erläutern die Grundlagen der Produkte von Privatversicherungen. (K2)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3>Ausgangslage</h3>
|
<h3>Ausgangslage</h3>
|
||||||
<p>
|
<p>
|
||||||
Stell dir vor, du hast die Autoprüfung abgeschlossen und nun kann es endlich losgehen mit deiner Mobilität.
|
Stell dir vor, du hast die Autoprüfung abgeschlossen und nun kann es endlich losgehen mit deiner Mobilität.
|
||||||
Welches wird dein erstes eigenes Auto sein? Dieses Auto möchtest du natürlich auch schützen und richtig
|
Welches wird dein erstes eigenes Auto sein? Dieses Auto möchtest du natürlich auch schützen und richtig
|
||||||
versichern.
|
versichern.
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -780,6 +780,477 @@ def create_uk_prep_assignment(course_id=COURSE_UK):
|
||||||
return assignment
|
return assignment
|
||||||
|
|
||||||
|
|
||||||
|
def create_uk_kickoff_prep_assignment(course_id=COURSE_UK):
|
||||||
|
assignment_list_page = (
|
||||||
|
CoursePage.objects.get(course_id=course_id)
|
||||||
|
.get_children()
|
||||||
|
.exact_type(AssignmentListPage)
|
||||||
|
.first()
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment = AssignmentFactory(
|
||||||
|
parent=assignment_list_page,
|
||||||
|
assignment_type=AssignmentType.PREP_ASSIGNMENT.name,
|
||||||
|
title="Kickoff - Versicherungswirtschaft",
|
||||||
|
effort_required="ca. 2 Stunden",
|
||||||
|
intro_text=replace_whitespace(
|
||||||
|
"""
|
||||||
|
<h3>Handlungskompetenzen, Arbeitssituationen & Leistungsziele</h3>
|
||||||
|
<p>
|
||||||
|
Handlungskompetenz d2: Informations- und Beratungsgespräch mit Kunden oder Lieferanten führen<br/>
|
||||||
|
Arbeitssituation 4: Kunden beraten und dazugehörige Prozesse abwickeln<br/>
|
||||||
|
<ul>
|
||||||
|
<li>d2.pv.ük1: Sie beschreiben die wichtigsten gesetzlichen Grundlagen im Versicherungsbereich umfassend</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Handlungskompetenz c3: Betriebliche Prozesse dokumentieren, koordinieren und umsetzen<br/>
|
||||||
|
Arbeitssituation 5: Anträge verarbeiten, Verträge gestalten, Produkte entwickeln und pflegen<br/>
|
||||||
|
<ul>
|
||||||
|
<li>c3.pv.ük6: Sie nennen die gängigen Grundsätze bei der Gestaltung von Produkten und Dienstleistungen im Versicherungsbereich (K1)</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Ausgangslage</h3>
|
||||||
|
<p>
|
||||||
|
Das Leben hat nicht nur Sonnenseiten, es birgt auch Risiken in sich. So können wir schon morgen einen
|
||||||
|
Unfall haben oder schwer erkranken. Oder ein Haus wird durch ein Hagelzug ziemlich beschädigt. Vor
|
||||||
|
solchen Risiken kann sich niemand vollständig schützen. Jedoch können wir uns gegen den finanziellen
|
||||||
|
Schaden absichern. Diese Art von Schutz bieten Versicherungen.<br/>
|
||||||
|
In dieser Sequenz beschäftigen wir uns damit, das eigentlich eine Versicherung ausmacht.
|
||||||
|
</p>
|
||||||
|
"""
|
||||||
|
),
|
||||||
|
performance_objectives=[],
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.tasks = []
|
||||||
|
assignment.tasks.append(
|
||||||
|
(
|
||||||
|
"task",
|
||||||
|
TaskBlockFactory(
|
||||||
|
title="Teilaufgabe 1: Verschaffe dir einen ersten Überblick zum Thema.",
|
||||||
|
# it is hard to create a StreamValue programmatically, we have to
|
||||||
|
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||||
|
content=StreamValue(
|
||||||
|
TaskContentStreamBlock(),
|
||||||
|
stream_data=[
|
||||||
|
(
|
||||||
|
"explanation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
'Schaue dazu das folgende Video: <a href="https://www.youtube.com/watch?v=NgttivRt6Fo&list=PL1caXvEGRT26oPfYc2C7CbYrldQQglzFI&index=2" target="_blank"> Wie funktioniert eine Versicherung? – Einfach erklärt </a>'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user_confirmation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
"Ja, ich habe das Video angeschaut und verstanden."
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.tasks.append(
|
||||||
|
(
|
||||||
|
"task",
|
||||||
|
TaskBlockFactory(
|
||||||
|
title="Teilaufgabe 2: «Idee Versicherung» lesen",
|
||||||
|
# it is hard to create a StreamValue programmatically, we have to
|
||||||
|
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||||
|
content=StreamValue(
|
||||||
|
TaskContentStreamBlock(),
|
||||||
|
stream_data=[
|
||||||
|
(
|
||||||
|
"explanation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
"Lese und bearbeite im Buch «Idee Versicherung» die Seiten 12 bis 30."
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user_confirmation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
"Ja, ich habe die Seiten gelesen und verstanden."
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.tasks.append(
|
||||||
|
(
|
||||||
|
"task",
|
||||||
|
TaskBlockFactory(
|
||||||
|
title="Teilaufgabe 3: Skizze erstellen",
|
||||||
|
# it is hard to create a StreamValue programmatically, we have to
|
||||||
|
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||||
|
content=StreamValue(
|
||||||
|
TaskContentStreamBlock(),
|
||||||
|
stream_data=[
|
||||||
|
(
|
||||||
|
"explanation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
replace_whitespace(
|
||||||
|
"""
|
||||||
|
<p>
|
||||||
|
Erstelle aufgrund des Gelesenen eine Skizze, welche für dich das Grundprinzip einer Versicherung darstellt.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Nimm diese Skizze mit in den Unterricht.
|
||||||
|
</p>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user_confirmation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText("Ja, ich habe die Skizze erstellt.")
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.save()
|
||||||
|
|
||||||
|
return assignment
|
||||||
|
|
||||||
|
|
||||||
|
def create_uk_basis_prep_assignment(course_id=COURSE_UK):
|
||||||
|
assignment_list_page = (
|
||||||
|
CoursePage.objects.get(course_id=course_id)
|
||||||
|
.get_children()
|
||||||
|
.exact_type(AssignmentListPage)
|
||||||
|
.first()
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment = AssignmentFactory(
|
||||||
|
parent=assignment_list_page,
|
||||||
|
assignment_type=AssignmentType.PREP_ASSIGNMENT.name,
|
||||||
|
title="Circle Basis",
|
||||||
|
effort_required="ca. 1 Tag",
|
||||||
|
intro_text=replace_whitespace(
|
||||||
|
"""
|
||||||
|
<h3>Handlungskompetenzen, Arbeitssituationen & Leistungsziele</h3>
|
||||||
|
<p>
|
||||||
|
Handlungskompetenz d2: Informations- und Beratungsgespräch mit Kunden oder Lieferanten führen<br/>
|
||||||
|
Arbeitssituation 4: Kunden beraten und dazugehörige Prozesse abwickeln<br/>
|
||||||
|
<ul>
|
||||||
|
<li>d2.pv.ük1: Sie beschreiben die wichtigsten gesetzlichen Grundlagen im Versicherungsbereich umfassend (K2).</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Handlungskompetenz c3: Betriebliche Prozesse dokumentieren, koordinieren und umsetzen<br/>
|
||||||
|
Arbeitssituation 5: Anträge verarbeiten, Verträge gestalten, Produkte entwickeln und pflegen<br/>
|
||||||
|
<ul>
|
||||||
|
<li>c3.pv.ük6: Sie nennen die gängigen Grundsätze bei der Gestaltung von Produkten und Dienstleistungen im Versicherungsbereich (K1)</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Ausgangslage</h3>
|
||||||
|
<p>
|
||||||
|
Du bist in einer spannenden Branche gelandet. In der Welt der Versicherungen. Für das Funktionieren
|
||||||
|
einer modernen Volkswirtschaft sind Versicherungen von grosser Bedeutung. Deshalb ist es zwingend
|
||||||
|
notwendig, dass du dich mit den Grundlagen der Versicherungen auseinandersetzt.
|
||||||
|
</p>
|
||||||
|
"""
|
||||||
|
),
|
||||||
|
performance_objectives=[],
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.tasks = []
|
||||||
|
assignment.tasks.append(
|
||||||
|
(
|
||||||
|
"task",
|
||||||
|
TaskBlockFactory(
|
||||||
|
title="Teilaufgabe 1: Verschaffe dir einen ersten Überblick zum Thema.",
|
||||||
|
# it is hard to create a StreamValue programmatically, we have to
|
||||||
|
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||||
|
content=StreamValue(
|
||||||
|
TaskContentStreamBlock(),
|
||||||
|
stream_data=[
|
||||||
|
(
|
||||||
|
"explanation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
"""
|
||||||
|
Verschaffe dir einen ersten Überblick zu den unterschiedlichen Prozessen
|
||||||
|
eines Versicherungsunternehmens. Lese dazu im Lernmedium «Kunde und
|
||||||
|
Versicherung» den Abschnitt «Die Wertschöpfungsprozesse eines
|
||||||
|
Versicherers» (Seiten 14 bis 17)
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user_confirmation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText("Ja, ich habe den Abschnitt gelesen.")
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.tasks.append(
|
||||||
|
(
|
||||||
|
"task",
|
||||||
|
TaskBlockFactory(
|
||||||
|
title="Teilaufgabe 2: Interview",
|
||||||
|
# it is hard to create a StreamValue programmatically, we have to
|
||||||
|
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||||
|
content=StreamValue(
|
||||||
|
TaskContentStreamBlock(),
|
||||||
|
stream_data=[
|
||||||
|
(
|
||||||
|
"explanation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
"""
|
||||||
|
<p>Interviewe in deinem Lehrbetrieb je eine Person aus zwei von dir gewählten
|
||||||
|
Geschäftsprozess-Bereichen (z. B. Underwriting und Schaden) und frage sie
|
||||||
|
folgendes:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Welches sind die 2 grössten Herausforderungen in deinem Bereich?</li>
|
||||||
|
<li>Was macht den Job in deinem Bereich besonders spannend?</li>
|
||||||
|
</ul>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user_text_input",
|
||||||
|
UserTextInputBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
"Notiere deine Ergebnisse elektronisch oder physisch und bring alles ins Training mit."
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.tasks.append(
|
||||||
|
(
|
||||||
|
"task",
|
||||||
|
TaskBlockFactory(
|
||||||
|
title="Teilaufgabe 3: Überblick Kennzahlen",
|
||||||
|
# it is hard to create a StreamValue programmatically, we have to
|
||||||
|
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||||
|
content=StreamValue(
|
||||||
|
TaskContentStreamBlock(),
|
||||||
|
stream_data=[
|
||||||
|
(
|
||||||
|
"explanation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
replace_whitespace(
|
||||||
|
"""
|
||||||
|
<p>
|
||||||
|
Verschaffe dir einen ersten Überblick zu den unterschiedlichen Kennzahlen.
|
||||||
|
Lese dazu im Lernmedium «Kunde und Versicherung» den Abschnitt «Das
|
||||||
|
Unternehmen Versicherung in Zahlen» (Seiten 26 bis 32)
|
||||||
|
</p>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user_confirmation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText("Ja, ich habe den Abschnitt gelesen.")
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.tasks.append(
|
||||||
|
(
|
||||||
|
"task",
|
||||||
|
TaskBlockFactory(
|
||||||
|
title="Teilaufgabe 4: Kennzahlen im Detail",
|
||||||
|
# it is hard to create a StreamValue programmatically, we have to
|
||||||
|
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||||
|
content=StreamValue(
|
||||||
|
TaskContentStreamBlock(),
|
||||||
|
stream_data=[
|
||||||
|
(
|
||||||
|
"explanation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
replace_whitespace(
|
||||||
|
"""
|
||||||
|
<p>
|
||||||
|
Bring aus deinem Lehrbetrieb 3 Kennzahlen aus dem letzten Geschäftsjahr in Erfahrung:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>Prämieneinnahmen in Franken</li>
|
||||||
|
<li>Kostenaufwand in Franken</li>
|
||||||
|
<li>Schadenaufwand / Schadenzahlungen in Franken</li>
|
||||||
|
</ul>
|
||||||
|
<p>Wenn du nicht weiterkommst, frag deine Ansprechperson im Lehrbetrieb.</p>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user_text_input",
|
||||||
|
UserTextInputBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
"Notiere deine Ergebnisse elektronisch oder physisch und bring alles ins Training mit."
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.tasks.append(
|
||||||
|
(
|
||||||
|
"task",
|
||||||
|
TaskBlockFactory(
|
||||||
|
title="Teilaufgabe 5: Rechte und Pflichten",
|
||||||
|
# it is hard to create a StreamValue programmatically, we have to
|
||||||
|
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||||
|
content=StreamValue(
|
||||||
|
TaskContentStreamBlock(),
|
||||||
|
stream_data=[
|
||||||
|
(
|
||||||
|
"explanation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
replace_whitespace(
|
||||||
|
"""
|
||||||
|
<p>Lese im Lehrmittel «Kunde und Versicherung» den Abschnitt «Die Rechteund Pflichten der Parteien» (Seiten 130 bis 141)</p>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user_confirmation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText("Ja, ich habe den Abschnitt gelesen.")
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.tasks.append(
|
||||||
|
(
|
||||||
|
"task",
|
||||||
|
TaskBlockFactory(
|
||||||
|
title="Teilaufgabe 6: Versicherungsvertraggesetz (VVG)",
|
||||||
|
# it is hard to create a StreamValue programmatically, we have to
|
||||||
|
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||||
|
content=StreamValue(
|
||||||
|
TaskContentStreamBlock(),
|
||||||
|
stream_data=[
|
||||||
|
(
|
||||||
|
"explanation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
replace_whitespace(
|
||||||
|
"""
|
||||||
|
<p>Besorge dir ein VVG (Versicherungsvertragsgesetz) auf <a href="https://www.fedlex.admin.ch/eli/cc/24/719_735_717/de">www.fedlex.admin.ch</a></p>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user_confirmation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText("Ja, ich habe das VVG besorgt.")
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.tasks.append(
|
||||||
|
(
|
||||||
|
"task",
|
||||||
|
TaskBlockFactory(
|
||||||
|
title="Teilaufgabe 7: Rechte und Pflichten im Lehrbetrieb",
|
||||||
|
# it is hard to create a StreamValue programmatically, we have to
|
||||||
|
# create a `StreamValue` manually. Ask Daniel and/or Ramon
|
||||||
|
content=StreamValue(
|
||||||
|
TaskContentStreamBlock(),
|
||||||
|
stream_data=[
|
||||||
|
(
|
||||||
|
"explanation",
|
||||||
|
ExplanationBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
replace_whitespace(
|
||||||
|
"""
|
||||||
|
<p>
|
||||||
|
Kläre im Lehrbetrieb zwei Fragen:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>Wie geht dein Lehrbetrieb vor, wenn der Kunde die Prämie nicht zahlt?</li>
|
||||||
|
<li>Kostenaufwand in Franken</li>
|
||||||
|
<li>Wie geht dein Lehrbetrieb vor, wenn der Kunde ein Schadenereignis grobfahrlässig herbeigeführt hat?</li>
|
||||||
|
</ul>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user_text_input",
|
||||||
|
UserTextInputBlockFactory(
|
||||||
|
text=RichText(
|
||||||
|
"Notiere deine Ergebnisse elektronisch oder physisch und bring alles ins Training mit."
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assignment.save()
|
||||||
|
|
||||||
|
return assignment
|
||||||
|
|
||||||
|
|
||||||
def create_uk_reflection(course_id=COURSE_UK, circle_title="Fahrzeug"):
|
def create_uk_reflection(course_id=COURSE_UK, circle_title="Fahrzeug"):
|
||||||
assignment_list_page = (
|
assignment_list_page = (
|
||||||
CoursePage.objects.get(course_id=course_id)
|
CoursePage.objects.get(course_id=course_id)
|
||||||
|
|
@ -791,15 +1262,15 @@ def create_uk_reflection(course_id=COURSE_UK, circle_title="Fahrzeug"):
|
||||||
assignment = AssignmentFactory(
|
assignment = AssignmentFactory(
|
||||||
parent=assignment_list_page,
|
parent=assignment_list_page,
|
||||||
assignment_type=AssignmentType.REFLECTION.name,
|
assignment_type=AssignmentType.REFLECTION.name,
|
||||||
title=f"{circle_title} - Reflexionsfragen",
|
title=f"Reflexion",
|
||||||
effort_required="ca. 1 Stunde",
|
effort_required="ca. 1 Stunde",
|
||||||
intro_text=replace_whitespace(
|
intro_text=replace_whitespace(
|
||||||
"""
|
"""
|
||||||
<p>
|
<p>
|
||||||
Du hast in diesem Circle viele neue Inhalte und Inputs erhalten.
|
Du hast in diesem Circle viele neue Inhalte und Inputs erhalten.
|
||||||
Nun ist es Zeit, nochmals auf dein Kompetenzprofil zu schauen.
|
Nun ist es Zeit, nochmals auf dein Kompetenzprofil zu schauen.
|
||||||
Das Beantworten von Reflexionsfragen hilft dir den eigenen Lern- und Denkprozess sichtbar und begreifbar zu machen.
|
Das Beantworten von Reflexionsfragen hilft dir den eigenen Lern- und Denkprozess sichtbar und begreifbar zu machen.
|
||||||
Es deckt deine persönlichen Stärken und Schwächen während der Erarbeitung auf und hilft dir, dich laufend zu verbessern.
|
Es deckt deine persönlichen Stärken und Schwächen während der Erarbeitung auf und hilft dir, dich laufend zu verbessern.
|
||||||
</p>
|
</p>
|
||||||
"""
|
"""
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@ import json
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from rest_framework.test import APITestCase
|
from rest_framework.test import APITestCase
|
||||||
|
|
||||||
from vbv_lernwelt.assignment.creators.create_assignments import create_uk_casework
|
from vbv_lernwelt.assignment.creators.create_assignments import (
|
||||||
|
create_uk_fahrzeug_casework,
|
||||||
|
)
|
||||||
from vbv_lernwelt.assignment.models import (
|
from vbv_lernwelt.assignment.models import (
|
||||||
AssignmentCompletion,
|
AssignmentCompletion,
|
||||||
AssignmentCompletionAuditLog,
|
AssignmentCompletionAuditLog,
|
||||||
|
|
@ -20,7 +22,7 @@ class AssignmentApiTestCase(APITestCase):
|
||||||
def setUp(self) -> None:
|
def setUp(self) -> None:
|
||||||
create_default_users()
|
create_default_users()
|
||||||
create_test_course(include_vv=False)
|
create_test_course(include_vv=False)
|
||||||
self.assignment = create_uk_casework(course_id=COURSE_TEST_ID)
|
self.assignment = create_uk_fahrzeug_casework(course_id=COURSE_TEST_ID)
|
||||||
self.assignment_subtasks = self.assignment.filter_user_subtasks()
|
self.assignment_subtasks = self.assignment.filter_user_subtasks()
|
||||||
|
|
||||||
self.cs = CourseSession.objects.create(
|
self.cs = CourseSession.objects.create(
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ from wagtail.models import Site
|
||||||
from wagtail.rich_text import RichText
|
from wagtail.rich_text import RichText
|
||||||
|
|
||||||
from vbv_lernwelt.assignment.creators.create_assignments import (
|
from vbv_lernwelt.assignment.creators.create_assignments import (
|
||||||
create_uk_casework,
|
create_uk_fahrzeug_casework,
|
||||||
create_uk_prep_assignment,
|
create_uk_fahrzeug_prep_assignment,
|
||||||
)
|
)
|
||||||
from vbv_lernwelt.assignment.models import Assignment
|
from vbv_lernwelt.assignment.models import Assignment
|
||||||
from vbv_lernwelt.assignment.services import update_assignment_completion
|
from vbv_lernwelt.assignment.services import update_assignment_completion
|
||||||
|
|
@ -72,8 +72,8 @@ def create_test_course(include_uk=True, include_vv=True, with_sessions=False):
|
||||||
_assignment_list_page = AssignmentListPageFactory(
|
_assignment_list_page = AssignmentListPageFactory(
|
||||||
parent=course_page,
|
parent=course_page,
|
||||||
)
|
)
|
||||||
create_uk_casework(course_id=COURSE_TEST_ID)
|
create_uk_fahrzeug_casework(course_id=COURSE_TEST_ID)
|
||||||
create_uk_prep_assignment(course_id=COURSE_TEST_ID)
|
create_uk_fahrzeug_prep_assignment(course_id=COURSE_TEST_ID)
|
||||||
|
|
||||||
create_test_learning_path(include_uk=include_uk, include_vv=include_vv)
|
create_test_learning_path(include_uk=include_uk, include_vv=include_vv)
|
||||||
create_test_media_library()
|
create_test_media_library()
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,19 @@ from vbv_lernwelt.learnpath.tests.learning_path_factories import (
|
||||||
CircleFactory,
|
CircleFactory,
|
||||||
LearningContentAssignmentFactory,
|
LearningContentAssignmentFactory,
|
||||||
LearningContentAttendanceCourseFactory,
|
LearningContentAttendanceCourseFactory,
|
||||||
|
LearningContentDocumentListFactory,
|
||||||
LearningContentFeedbackFactory,
|
LearningContentFeedbackFactory,
|
||||||
LearningContentMediaLibraryFactory,
|
LearningContentMediaLibraryFactory,
|
||||||
LearningContentPlaceholderFactory,
|
LearningContentPlaceholderFactory,
|
||||||
|
LearningContentTestFactory,
|
||||||
LearningPathFactory,
|
LearningPathFactory,
|
||||||
LearningSequenceFactory,
|
LearningSequenceFactory,
|
||||||
LearningUnitFactory,
|
LearningUnitFactory,
|
||||||
TopicFactory,
|
TopicFactory,
|
||||||
)
|
)
|
||||||
|
from vbv_lernwelt.media_library.tests.media_library_factories import (
|
||||||
|
LearnMediaBlockFactory,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def create_uk_learning_path(course_id=COURSE_UK, user=None, skip_locales=True):
|
def create_uk_learning_path(course_id=COURSE_UK, user=None, skip_locales=True):
|
||||||
|
|
@ -225,23 +230,59 @@ In diesem Circle erfährst du wie die überbetrieblichen Kurse aufgebaut sind. Z
|
||||||
)
|
)
|
||||||
LearningUnitFactory(title="Vorbereitung", parent=circle)
|
LearningUnitFactory(title="Vorbereitung", parent=circle)
|
||||||
LearningContentMediaLibraryFactory(
|
LearningContentMediaLibraryFactory(
|
||||||
title=f"Handlungsfeld «{title}»",
|
title=f"Allgemeines zu Versicherungen",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
description=RichText(
|
description=RichText(
|
||||||
f"<p>In der Mediathek unter dem Handlungsfeld «{title}» findest du alle relevanten Ressourcen für deine Fachkompetenzen.</p>"
|
f"<p>In der Mediathek unter «Allgemeines zu Versicherungen» findest du alle relevanten Ressourcen für deine Fachkompetenzen.</p>"
|
||||||
f"<p>Wir empfehlen dir vor der Absolvierung der weiteren Lerneinheiten dich in die Thematik einzulesen.</p>"
|
f"<p>Wir empfehlen dir vor der Absolvierung der weiteren Lerneinheiten dich in die Thematik einzulesen.</p>"
|
||||||
),
|
),
|
||||||
content_url=f"/course/überbetriebliche-kurse/media/category/{slugify(title)}",
|
content_url=f"/course/überbetriebliche-kurse/media",
|
||||||
)
|
)
|
||||||
LearningContentPlaceholderFactory(
|
LearningContentAssignmentFactory(
|
||||||
title="Vorbereitungsauftrag",
|
title="Versicherungswirtschaft",
|
||||||
|
assignment_type="PREP_ASSIGNMENT",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
)
|
content_assignment=Assignment.objects.get(
|
||||||
|
slug__startswith=f"überbetriebliche-kurse-assignment-kickoff-versicherungswirtschaft"
|
||||||
|
),
|
||||||
|
),
|
||||||
LearningSequenceFactory(title="Training", parent=circle)
|
LearningSequenceFactory(title="Training", parent=circle)
|
||||||
LearningUnitFactory(title="Unterlagen", parent=circle)
|
LearningUnitFactory(title="Unterlagen", parent=circle)
|
||||||
LearningContentPlaceholderFactory(
|
LearningContentDocumentListFactory(
|
||||||
title="Unterlagen für den Unterricht",
|
title="Unterlagen für den Unterricht",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
|
documents=[
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Präsentation 1a",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_KO_03b_A_Einteilungen.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Präsentation 1b",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_KO_03b_A_Einteilungen.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Arbeitsblatt Einteilung der Versicherungen",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_KO_03b_A_Einteilungen.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
LearningUnitFactory(title="Präsenzkurs", parent=circle)
|
LearningUnitFactory(title="Präsenzkurs", parent=circle)
|
||||||
LearningContentAttendanceCourseFactory(
|
LearningContentAttendanceCourseFactory(
|
||||||
|
|
@ -252,11 +293,15 @@ In diesem Circle erfährst du wie die überbetrieblichen Kurse aufgebaut sind. Z
|
||||||
parent=circle,
|
parent=circle,
|
||||||
)
|
)
|
||||||
LearningSequenceFactory(title="Transfer", parent=circle, icon="it-icon-ls-end")
|
LearningSequenceFactory(title="Transfer", parent=circle, icon="it-icon-ls-end")
|
||||||
LearningUnitFactory(title="Transfer", parent=circle)
|
LearningUnitFactory(title="Reflexion", parent=circle)
|
||||||
LearningContentPlaceholderFactory(
|
LearningContentAssignmentFactory(
|
||||||
title="Reflexion",
|
title="Reflexion",
|
||||||
|
assignment_type="REFLECTION",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
)
|
content_assignment=Assignment.objects.get(
|
||||||
|
slug__startswith=f"überbetriebliche-kurse-assignment-reflexion"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
def create_uk_circle_basis(lp, title="Basis"):
|
def create_uk_circle_basis(lp, title="Basis"):
|
||||||
|
|
@ -273,23 +318,69 @@ In diesem Circle lernst du die wichtigsten Grundlagen bezüglich Versicherungswi
|
||||||
)
|
)
|
||||||
LearningUnitFactory(title="Vorbereitung", parent=circle)
|
LearningUnitFactory(title="Vorbereitung", parent=circle)
|
||||||
LearningContentMediaLibraryFactory(
|
LearningContentMediaLibraryFactory(
|
||||||
title=f"Handlungsfeld «{title}»",
|
title=f"Allgemeines zu Versicherungen",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
description=RichText(
|
description=RichText(
|
||||||
f"<p>In der Mediathek unter dem Handlungsfeld «{title}» findest du alle relevanten Ressourcen für deine Fachkompetenzen.</p>"
|
f"<p>In der Mediathek unter «Allgemeines zu Versicherungen» findest du alle relevanten Ressourcen für deine Fachkompetenzen.</p>"
|
||||||
f"<p>Wir empfehlen dir vor der Absolvierung der weiteren Lerneinheiten dich in die Thematik einzulesen.</p>"
|
f"<p>Wir empfehlen dir vor der Absolvierung der weiteren Lerneinheiten dich in die Thematik einzulesen.</p>"
|
||||||
),
|
),
|
||||||
content_url=f"/course/überbetriebliche-kurse/media/category/{slugify(title)}",
|
content_url=f"/course/überbetriebliche-kurse/media",
|
||||||
)
|
)
|
||||||
LearningContentPlaceholderFactory(
|
LearningContentAssignmentFactory(
|
||||||
title="Vorbereitungsauftrag",
|
title="Vorbereitungsauftrag Circle Basis",
|
||||||
|
assignment_type="PREP_ASSIGNMENT",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
)
|
content_assignment=Assignment.objects.get(
|
||||||
|
slug__startswith=f"überbetriebliche-kurse-assignment-circle-basis"
|
||||||
|
),
|
||||||
|
),
|
||||||
LearningSequenceFactory(title="Training", parent=circle)
|
LearningSequenceFactory(title="Training", parent=circle)
|
||||||
LearningUnitFactory(title="Unterlagen", parent=circle)
|
LearningUnitFactory(title="Unterlagen", parent=circle)
|
||||||
LearningContentPlaceholderFactory(
|
LearningContentDocumentListFactory(
|
||||||
title="Unterlagen für den Unterricht",
|
title="Unterlagen für den Unterricht",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
|
documents=[
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Präsentation",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_BA_04_A_Risikomanagement.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Risikomanagement",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_BA_04_A_Risikomanagement.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Quizzes",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_BA_05_QR_Quizzes.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Versicherungsrecht",
|
||||||
|
description="Antragsannahme, Bindefrist und Widerrufsrecht – Kleine Fallstudie",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_BA_06_A_Versicherungsrecht.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
LearningUnitFactory(title="Präsenzkurs", parent=circle)
|
LearningUnitFactory(title="Präsenzkurs", parent=circle)
|
||||||
LearningContentAttendanceCourseFactory(
|
LearningContentAttendanceCourseFactory(
|
||||||
|
|
@ -297,19 +388,28 @@ In diesem Circle lernst du die wichtigsten Grundlagen bezüglich Versicherungswi
|
||||||
parent=circle,
|
parent=circle,
|
||||||
)
|
)
|
||||||
LearningUnitFactory(title="Kompetenznachweis", parent=circle)
|
LearningUnitFactory(title="Kompetenznachweis", parent=circle)
|
||||||
LearningContentPlaceholderFactory(
|
LearningContentTestFactory(
|
||||||
title="Wissens- und Verständnisfragen",
|
title="Wissens- und Verständnisfragen",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
|
description=RichText(
|
||||||
|
"<p>Folgender Test mit Wissens- und Verständnisfragen ist Teil des Kompetenznachweises. Der Test kann nur einmal durchgeführt werden und ist notenrelevant.</p>"
|
||||||
|
),
|
||||||
|
checkbox_text="Hiermit bestätige ich, dass ich die Anweisungen verstanden habe und den Test durchführen möchte.",
|
||||||
|
content_url="http://example.com",
|
||||||
)
|
)
|
||||||
LearningContentFeedbackFactory(
|
LearningContentFeedbackFactory(
|
||||||
parent=circle,
|
parent=circle,
|
||||||
)
|
)
|
||||||
LearningSequenceFactory(title="Transfer", parent=circle, icon="it-icon-ls-end")
|
LearningSequenceFactory(title="Transfer", parent=circle, icon="it-icon-ls-end")
|
||||||
LearningUnitFactory(title="Transfer", parent=circle)
|
LearningUnitFactory(title="Reflexion", parent=circle)
|
||||||
LearningContentPlaceholderFactory(
|
LearningContentAssignmentFactory(
|
||||||
title="Reflexion",
|
title="Reflexion",
|
||||||
|
assignment_type="REFLECTION",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
)
|
content_assignment=Assignment.objects.get(
|
||||||
|
slug__startswith=f"überbetriebliche-kurse-assignment-reflexion"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
def create_uk_circle_fahrzeug(lp, title="Fahrzeug"):
|
def create_uk_circle_fahrzeug(lp, title="Fahrzeug"):
|
||||||
|
|
@ -343,9 +443,81 @@ def create_uk_circle_fahrzeug(lp, title="Fahrzeug"):
|
||||||
),
|
),
|
||||||
LearningSequenceFactory(title="Training", parent=circle)
|
LearningSequenceFactory(title="Training", parent=circle)
|
||||||
LearningUnitFactory(title="Unterlagen", parent=circle)
|
LearningUnitFactory(title="Unterlagen", parent=circle)
|
||||||
LearningContentPlaceholderFactory(
|
LearningContentDocumentListFactory(
|
||||||
title="Unterlagen für den Unterricht",
|
title="Unterlagen für den Unterricht",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
|
documents=[
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Präsentation",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_FZ_00_Präsentation.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Begriffe",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_FZ_02_Begriffe.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Checkliste",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_FZ_04_Checkliste.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Arbeitsblatt Schadenfälle",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_FZ_05_A_Schaden.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Überblick Kasko",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_FZ_07_Kasko.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Offerte und anschliessendes Verkaufsgespräch",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_FZ_08_A_Offerte und Verkaufsgespräch.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
LearnMediaBlockFactory(
|
||||||
|
title="Arbeitsblatt Schadenfälle Reserve",
|
||||||
|
description="",
|
||||||
|
icon_url="/static/icons/demo/icon-hf-book.png",
|
||||||
|
link_display_text="Dokument anzeigen",
|
||||||
|
url="/static/media/uk/de_üK1_FZ_A_Reserve_Schaden.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
LearningUnitFactory(title="Präsenzkurs", parent=circle)
|
LearningUnitFactory(title="Präsenzkurs", parent=circle)
|
||||||
LearningContentAttendanceCourseFactory(
|
LearningContentAttendanceCourseFactory(
|
||||||
|
|
@ -365,11 +537,11 @@ def create_uk_circle_fahrzeug(lp, title="Fahrzeug"):
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
LearningContentAssignmentFactory(
|
LearningContentAssignmentFactory(
|
||||||
title="Reflexionsfragen Fahrzeug",
|
title="Reflexion",
|
||||||
assignment_type="REFLECTION",
|
assignment_type="REFLECTION",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
content_assignment=Assignment.objects.get(
|
content_assignment=Assignment.objects.get(
|
||||||
slug__startswith=f"{course_slug}-assignment-fahrzeug-reflexionsfragen"
|
slug__startswith=f"{course_slug}-assignment-reflexion"
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,10 @@ import random
|
||||||
import djclick as click
|
import djclick as click
|
||||||
|
|
||||||
from vbv_lernwelt.assignment.creators.create_assignments import (
|
from vbv_lernwelt.assignment.creators.create_assignments import (
|
||||||
create_uk_casework,
|
create_uk_basis_prep_assignment,
|
||||||
create_uk_prep_assignment,
|
create_uk_fahrzeug_casework,
|
||||||
|
create_uk_fahrzeug_prep_assignment,
|
||||||
|
create_uk_kickoff_prep_assignment,
|
||||||
create_uk_reflection,
|
create_uk_reflection,
|
||||||
)
|
)
|
||||||
from vbv_lernwelt.assignment.models import Assignment
|
from vbv_lernwelt.assignment.models import Assignment
|
||||||
|
|
@ -169,8 +171,10 @@ def create_course_uk_de():
|
||||||
_assignment_list_page = AssignmentListPageFactory(
|
_assignment_list_page = AssignmentListPageFactory(
|
||||||
parent=course.coursepage,
|
parent=course.coursepage,
|
||||||
)
|
)
|
||||||
create_uk_casework(course_id=COURSE_UK)
|
create_uk_kickoff_prep_assignment(course_id=COURSE_UK)
|
||||||
create_uk_prep_assignment(course_id=COURSE_UK)
|
create_uk_basis_prep_assignment(course_id=COURSE_UK)
|
||||||
|
create_uk_fahrzeug_casework(course_id=COURSE_UK)
|
||||||
|
create_uk_fahrzeug_prep_assignment(course_id=COURSE_UK)
|
||||||
create_uk_reflection(course_id=COURSE_UK)
|
create_uk_reflection(course_id=COURSE_UK)
|
||||||
|
|
||||||
# learning path
|
# learning path
|
||||||
|
|
@ -427,8 +431,8 @@ def create_course_training_de():
|
||||||
_assignment_list_page = AssignmentListPageFactory(
|
_assignment_list_page = AssignmentListPageFactory(
|
||||||
parent=course.coursepage,
|
parent=course.coursepage,
|
||||||
)
|
)
|
||||||
create_uk_casework(course_id=COURSE_UK_TRAINING)
|
create_uk_fahrzeug_casework(course_id=COURSE_UK_TRAINING)
|
||||||
create_uk_prep_assignment(course_id=COURSE_UK_TRAINING)
|
create_uk_fahrzeug_prep_assignment(course_id=COURSE_UK_TRAINING)
|
||||||
create_uk_reflection(course_id=COURSE_UK_TRAINING)
|
create_uk_reflection(course_id=COURSE_UK_TRAINING)
|
||||||
|
|
||||||
create_uk_training_learning_path(course_id=COURSE_UK_TRAINING)
|
create_uk_training_learning_path(course_id=COURSE_UK_TRAINING)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
# Generated by Django 3.2.13 on 2023-05-26 10:34
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
import wagtail.blocks
|
||||||
|
import wagtail.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("wagtailcore", "0083_workflowcontenttype"),
|
||||||
|
("learnpath", "0004_learningcontentassignment_assignment_type"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name="LearningContentDocumentList",
|
||||||
|
fields=[
|
||||||
|
(
|
||||||
|
"page_ptr",
|
||||||
|
models.OneToOneField(
|
||||||
|
auto_created=True,
|
||||||
|
on_delete=django.db.models.deletion.CASCADE,
|
||||||
|
parent_link=True,
|
||||||
|
primary_key=True,
|
||||||
|
serialize=False,
|
||||||
|
to="wagtailcore.page",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
("minutes", models.PositiveIntegerField(default=15)),
|
||||||
|
("description", wagtail.fields.RichTextField(blank=True)),
|
||||||
|
("content_url", models.TextField(blank=True)),
|
||||||
|
(
|
||||||
|
"documents",
|
||||||
|
wagtail.fields.StreamField(
|
||||||
|
[
|
||||||
|
(
|
||||||
|
"document",
|
||||||
|
wagtail.blocks.StructBlock(
|
||||||
|
[
|
||||||
|
("title", wagtail.blocks.TextBlock()),
|
||||||
|
(
|
||||||
|
"description",
|
||||||
|
wagtail.blocks.TextBlock(
|
||||||
|
default="", required=False
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"icon_url",
|
||||||
|
wagtail.blocks.TextBlock(
|
||||||
|
default="", required=False
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"link_display_text",
|
||||||
|
wagtail.blocks.CharBlock(
|
||||||
|
default="Link öffnen", max_length=255
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"url",
|
||||||
|
wagtail.blocks.TextBlock(
|
||||||
|
default="", required=False
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"open_window",
|
||||||
|
wagtail.blocks.BooleanBlock(default=False),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
blank=True,
|
||||||
|
use_json_field=True,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
"abstract": False,
|
||||||
|
},
|
||||||
|
bases=("wagtailcore.page",),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 3.2.13 on 2023-05-26 14:31
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("learnpath", "0005_learningcontentdocumentlist"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="learningcontenttest",
|
||||||
|
name="checkbox_text",
|
||||||
|
field=models.TextField(blank=True),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -3,13 +3,14 @@ import re
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.text import slugify
|
from django.utils.text import slugify
|
||||||
from wagtail.admin.panels import FieldPanel, PageChooserPanel
|
from wagtail.admin.panels import FieldPanel, PageChooserPanel
|
||||||
from wagtail.fields import RichTextField
|
from wagtail.fields import RichTextField, StreamField
|
||||||
from wagtail.models import Page
|
from wagtail.models import Page
|
||||||
|
|
||||||
from vbv_lernwelt.assignment.models import AssignmentType
|
from vbv_lernwelt.assignment.models import AssignmentType
|
||||||
from vbv_lernwelt.core.constants import DEFAULT_RICH_TEXT_FEATURES_WITH_HEADER
|
from vbv_lernwelt.core.constants import DEFAULT_RICH_TEXT_FEATURES_WITH_HEADER
|
||||||
from vbv_lernwelt.core.model_utils import find_available_slug
|
from vbv_lernwelt.core.model_utils import find_available_slug
|
||||||
from vbv_lernwelt.course.models import CourseBasePage, CoursePage
|
from vbv_lernwelt.course.models import CourseBasePage, CoursePage
|
||||||
|
from vbv_lernwelt.media_library.content_blocks import LearnMediaBlock
|
||||||
|
|
||||||
|
|
||||||
class LearningPath(CourseBasePage):
|
class LearningPath(CourseBasePage):
|
||||||
|
|
@ -306,9 +307,18 @@ class LearningContentMediaLibrary(LearningContent):
|
||||||
|
|
||||||
|
|
||||||
class LearningContentTest(LearningContent):
|
class LearningContentTest(LearningContent):
|
||||||
|
serialize_field_names = LearningContent.serialize_field_names + [
|
||||||
|
"checkbox_text",
|
||||||
|
]
|
||||||
parent_page_types = ["learnpath.Circle"]
|
parent_page_types = ["learnpath.Circle"]
|
||||||
subpage_types = []
|
subpage_types = []
|
||||||
|
|
||||||
|
checkbox_text = models.TextField(blank=True)
|
||||||
|
|
||||||
|
content_panels = LearningContent.content_panels + [
|
||||||
|
FieldPanel("checkbox_text", classname="Text"),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class LearningContentRichText(LearningContent):
|
class LearningContentRichText(LearningContent):
|
||||||
text = RichTextField(blank=True, features=DEFAULT_RICH_TEXT_FEATURES_WITH_HEADER)
|
text = RichTextField(blank=True, features=DEFAULT_RICH_TEXT_FEATURES_WITH_HEADER)
|
||||||
|
|
@ -352,6 +362,29 @@ class LearningContentAssignment(LearningContent):
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class LearningContentDocumentList(LearningContent):
|
||||||
|
serialize_field_names = LearningContent.serialize_field_names + [
|
||||||
|
"documents",
|
||||||
|
]
|
||||||
|
parent_page_types = ["learnpath.Circle"]
|
||||||
|
subpage_types = []
|
||||||
|
|
||||||
|
documents = StreamField(
|
||||||
|
[
|
||||||
|
("document", LearnMediaBlock()),
|
||||||
|
],
|
||||||
|
use_json_field=True,
|
||||||
|
blank=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
content_panels = [
|
||||||
|
FieldPanel("title", classname="full title"),
|
||||||
|
FieldPanel("minutes"),
|
||||||
|
FieldPanel("description"),
|
||||||
|
FieldPanel("documents"),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def find_slug_with_parent_prefix(page, type_prefix, slug_postfix=None):
|
def find_slug_with_parent_prefix(page, type_prefix, slug_postfix=None):
|
||||||
parent_slug = page.get_ancestors().exact_type(LearningPath, Circle).last().slug
|
parent_slug = page.get_ancestors().exact_type(LearningPath, Circle).last().slug
|
||||||
if parent_slug:
|
if parent_slug:
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ from vbv_lernwelt.learnpath.models import (
|
||||||
Circle,
|
Circle,
|
||||||
LearningContentAssignment,
|
LearningContentAssignment,
|
||||||
LearningContentAttendanceCourse,
|
LearningContentAttendanceCourse,
|
||||||
|
LearningContentDocumentList,
|
||||||
LearningContentFeedback,
|
LearningContentFeedback,
|
||||||
LearningContentLearningModule,
|
LearningContentLearningModule,
|
||||||
LearningContentMediaLibrary,
|
LearningContentMediaLibrary,
|
||||||
|
|
@ -17,6 +18,9 @@ from vbv_lernwelt.learnpath.models import (
|
||||||
LearningUnit,
|
LearningUnit,
|
||||||
Topic,
|
Topic,
|
||||||
)
|
)
|
||||||
|
from vbv_lernwelt.media_library.tests.media_library_factories import (
|
||||||
|
LearnMediaBlockFactory,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class LearningPathFactory(wagtail_factories.PageFactory):
|
class LearningPathFactory(wagtail_factories.PageFactory):
|
||||||
|
|
@ -172,3 +176,17 @@ class LearningContentAssignmentFactory(wagtail_factories.PageFactory):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = LearningContentAssignment
|
model = LearningContentAssignment
|
||||||
|
|
||||||
|
|
||||||
|
class LearningContentDocumentListFactory(wagtail_factories.PageFactory):
|
||||||
|
title = "Dokumente"
|
||||||
|
minutes = 0
|
||||||
|
content_url = ""
|
||||||
|
description = RichText("")
|
||||||
|
documents = [
|
||||||
|
("document", LearnMediaBlockFactory()),
|
||||||
|
("document", LearnMediaBlockFactory()),
|
||||||
|
]
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = LearningContentDocumentList
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -2,6 +2,7 @@ server/requirements/
|
||||||
env_secrets/
|
env_secrets/
|
||||||
env/bitbucket/Dockerfile
|
env/bitbucket/Dockerfile
|
||||||
env/docker_local.env
|
env/docker_local.env
|
||||||
|
server/vbv_lernwelt/assignment/creators/create_assignments.py
|
||||||
server/vbv_lernwelt/static/
|
server/vbv_lernwelt/static/
|
||||||
server/vbv_lernwelt/media/
|
server/vbv_lernwelt/media/
|
||||||
supabase.md
|
supabase.md
|
||||||
|
|
@ -9,4 +10,4 @@ scripts/supabase/init.sql
|
||||||
ramon.wenger@iterativ.ch.gpg
|
ramon.wenger@iterativ.ch.gpg
|
||||||
.envs/
|
.envs/
|
||||||
client/package-lock.json
|
client/package-lock.json
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue