VBV-279: Inhaltstyp Reflexion

This commit is contained in:
Daniel Egger 2023-05-23 16:28:24 +02:00
parent b1d14fd691
commit 0f0d1632a7
6 changed files with 184 additions and 17 deletions

View File

@ -9,7 +9,7 @@ const router = useRouter();
defineProps<{
show: boolean;
courseSession: CourseSession | undefined;
mediaUrl: string | undefined;
mediaUrl?: string;
user: UserState | undefined;
}>();

View File

@ -108,10 +108,12 @@ onMounted(async () => {
const numTasks = computed(() => assignment.value?.tasks?.length ?? 0);
const numPages = computed(() => {
if (assignmentType.value === "PREP_ASSIGNMENT") {
return numTasks.value + 1;
if (assignmentType.value === "CASEWORK") {
// casework has extra submission page
return numTasks.value + 2;
}
return numTasks.value + 2;
return numTasks.value + 1;
});
const showPreviousButton = computed(() => stepIndex.value != 0);
const showNextButton = computed(() => stepIndex.value + 1 < numPages.value);
@ -172,6 +174,8 @@ const subTitle = computed(() => {
let prefix = "Geleitete Fallarbeit";
if (assignmentType.value === "PREP_ASSIGNMENT") {
prefix = "Vorbereitungsauftrag";
} else if (assignmentType.value === "REFLECTION") {
prefix = "Reflexion";
}
return `${prefix}: ${assignment.value?.title ?? ""}`;
}
@ -187,8 +191,12 @@ const assignmentUser = computed(() => {
const endBadgeText = computed(() => {
if (assignmentType.value === "PREP_ASSIGNMENT") {
return "Aufgaben";
} else if (assignmentType.value === "CASEWORK") {
return "Abgabe";
}
return "Abgabe";
// just return the number of tasks as default
return (assignment.value?.tasks.length ?? 0).toString();
});
</script>

View File

@ -10,17 +10,20 @@ export function learningContentTypeData(
lc: LearningContent
): LearningContentIdentifier {
switch (lc.content_type) {
case "learnpath.LearningContentAssignment":
if (lc.assignment_type === "PREP_ASSIGNMENT") {
return {
title: "Vorbereitungsauftrag",
icon: "it-icon-lc-assignment",
};
case "learnpath.LearningContentAssignment": {
let title = "unknown";
if (lc.assignment_type === "CASEWORK") {
title = "Geleitete Fallarbeit";
} else if (lc.assignment_type === "PREP_ASSIGNMENT") {
title = "Vorbereitungsaufgabe";
} else if (lc.assignment_type === "REFLECTION") {
title = "Reflexion";
}
return {
title: "Geleitete Fallarbeit",
icon: "it-icon-lc-assignment",
};
}
case "learnpath.LearningContentAttendanceCourse":
return { title: "Präsenzkurs", icon: "it-icon-lc-training" };
case "learnpath.LearningContentLearningModule":

View File

@ -1,3 +1,7 @@
from wagtail.blocks import StreamValue
from wagtail.blocks.list_block import ListBlock, ListValue
from wagtail.rich_text import RichText
from vbv_lernwelt.assignment.models import (
AssignmentType,
EvaluationSubTaskBlock,
@ -14,9 +18,6 @@ from vbv_lernwelt.assignment.tests.assignment_factories import (
)
from vbv_lernwelt.core.utils import replace_whitespace
from vbv_lernwelt.course.consts import COURSE_UK
from wagtail.blocks import StreamValue
from wagtail.blocks.list_block import ListBlock, ListValue
from wagtail.rich_text import RichText
def create_uk_casework(assignment_list_page, course_id=COURSE_UK):
@ -762,3 +763,152 @@ def create_uk_prep_assignment(assignment_list_page, course_id=COURSE_UK):
assignment.save()
return assignment
def create_uk_reflection(assignment_list_page, course_id=COURSE_UK):
assignment = AssignmentFactory(
parent=assignment_list_page,
assignment_type=AssignmentType.REFLECTION.name,
title="Reflexionsfragen - Fahrzeug",
effort_required="ca. 1 Stunde",
intro_text=replace_whitespace(
"""
<p>
Du hast in diesem Circle viele neue Inhalte und Inputs erhalten.
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.
Es deckt deine persönlichen Stärken und Schwächen während der Erarbeitung auf und hilft dir, dich laufend zu verbessern.
</p>
"""
),
performance_objectives=[],
)
assignment.tasks = []
assignment.tasks.append(
(
"task",
TaskBlockFactory(
title="Frage 1: Was gelingt mir bereits gut?",
content=StreamValue(
TaskContentStreamBlock(),
stream_data=[
(
"user_text_input",
UserTextInputBlockFactory(),
),
],
),
),
)
)
assignment.tasks.append(
(
"task",
TaskBlockFactory(
title="Frage 2: Vertiefung",
content=StreamValue(
TaskContentStreamBlock(),
stream_data=[
(
"user_text_input",
UserTextInputBlockFactory(
text=RichText(
"Wo muss ich mich noch vertiefen oder nochmals repetieren? "
)
),
),
],
),
),
)
)
assignment.tasks.append(
(
"task",
TaskBlockFactory(
title="Frage 3: Was nehme ich mit?",
content=StreamValue(
TaskContentStreamBlock(),
stream_data=[
(
"user_text_input",
UserTextInputBlockFactory(),
),
],
),
),
)
)
assignment.tasks.append(
(
"task",
TaskBlockFactory(
title="Frage 4: Vorbereitung",
content=StreamValue(
TaskContentStreamBlock(),
stream_data=[
(
"user_text_input",
UserTextInputBlockFactory(
text=RichText(
"Wie habe ich mich auf den Circle vorbereitet (z. B. Lernzeit eingeplant)?"
)
),
),
],
),
),
)
)
assignment.tasks.append(
(
"task",
TaskBlockFactory(
title="Frage 5: Präsenzunterricht",
content=StreamValue(
TaskContentStreamBlock(),
stream_data=[
(
"user_text_input",
UserTextInputBlockFactory(
text=RichText(
"Wie engagiert war ich im Präsenzunterricht?"
)
),
),
],
),
),
)
)
assignment.tasks.append(
(
"task",
TaskBlockFactory(
title="Frage 6: Verbesserung",
content=StreamValue(
TaskContentStreamBlock(),
stream_data=[
(
"user_text_input",
UserTextInputBlockFactory(
text=RichText(
"Was will ich für den nächsten Circle im Lernprozess ändern/verbessern?"
)
),
),
],
),
),
)
)
assignment.save()
return assignment

View File

@ -5,6 +5,7 @@ import djclick as click
from vbv_lernwelt.assignment.creators.create_assignments import (
create_uk_casework,
create_uk_prep_assignment,
create_uk_reflection,
)
from vbv_lernwelt.assignment.models import Assignment
from vbv_lernwelt.assignment.services import update_assignment_completion
@ -160,6 +161,7 @@ def create_course_uk_de():
)
create_uk_casework(assignment_list_page, course_id=COURSE_UK)
create_uk_prep_assignment(assignment_list_page, course_id=COURSE_UK)
create_uk_reflection(assignment_list_page, course_id=COURSE_UK)
# learning path
create_uk_learning_path(course_id=COURSE_UK)

View File

@ -269,10 +269,14 @@ damit du erfolgreich mit deinem Lernpfad (durch-)starten kannst.
)
LearningSequenceFactory(title="Transfer", parent=circle, icon="it-icon-ls-end")
LearningUnitFactory(title="Transfer", parent=circle)
LearningContentPlaceholderFactory(
title="Reflexion",
LearningContentAssignmentFactory(
title="Reflexionsfragen Fahrzeug",
assignment_type="REFLECTION",
parent=circle,
)
content_assignment=Assignment.objects.get(
slug__startswith="überbetriebliche-kurse-assignment-reflexionsfragen-fahrzeug"
),
),
LearningContentAssignmentFactory(
title="Überprüfen einer Motorfahrzeug-Versicherungspolice",
parent=circle,