104 lines
2.9 KiB
Python
104 lines
2.9 KiB
Python
import wagtail_factories
|
|
from factory import SubFactory
|
|
from wagtail.rich_text import RichText
|
|
|
|
from vbv_lernwelt.assignment.models import (
|
|
Assignment,
|
|
AssignmentListPage,
|
|
EvaluationSubTaskBlock,
|
|
EvaluationTaskBlock,
|
|
ExplanationBlock,
|
|
PerformanceObjectiveBlock,
|
|
TaskBlock,
|
|
TaskContentStreamBlock,
|
|
UserConfirmationBlock,
|
|
UserTextInputBlock,
|
|
)
|
|
from vbv_lernwelt.core.utils import replace_whitespace
|
|
|
|
|
|
class ExplanationBlockFactory(wagtail_factories.StructBlockFactory):
|
|
text = RichText("Dies ist ein Beispieltext.")
|
|
|
|
class Meta:
|
|
model = ExplanationBlock
|
|
|
|
|
|
class UserConfirmationBlockFactory(wagtail_factories.StructBlockFactory):
|
|
text = RichText(
|
|
"Ja, ich habe Motorfahrzeugversicherungspolice von jemandem aus meiner Familie oder meinem Freundeskreis erhalten."
|
|
)
|
|
|
|
class Meta:
|
|
model = UserConfirmationBlock
|
|
|
|
|
|
class TaskContentStreamBlockFactory(wagtail_factories.StreamBlockFactory):
|
|
explanation = SubFactory(ExplanationBlockFactory)
|
|
user_confirmation = SubFactory(UserConfirmationBlockFactory)
|
|
|
|
class Meta:
|
|
model = TaskContentStreamBlock
|
|
|
|
|
|
class UserTextInputBlockFactory(wagtail_factories.StructBlockFactory):
|
|
class Meta:
|
|
model = UserTextInputBlock
|
|
|
|
|
|
class TaskBlockFactory(wagtail_factories.StructBlockFactory):
|
|
title = "Teilauftrag"
|
|
file_submission_required = False
|
|
content = TaskContentStreamBlockFactory()
|
|
|
|
class Meta:
|
|
model = TaskBlock
|
|
|
|
|
|
class EvaluationSubTaskBlockFactory(wagtail_factories.StructBlockFactory):
|
|
title = "Beurteilung"
|
|
description = RichText("")
|
|
points = 6
|
|
|
|
class Meta:
|
|
model = EvaluationSubTaskBlock
|
|
|
|
|
|
class EvaluationTaskBlockFactory(wagtail_factories.StructBlockFactory):
|
|
title = "Beurteilungskriterum"
|
|
description = RichText("")
|
|
max_points = 6
|
|
|
|
class Meta:
|
|
model = EvaluationTaskBlock
|
|
|
|
|
|
class PerformanceObjectiveBlockFactory(wagtail_factories.StructBlockFactory):
|
|
text = "Die Teilnehmer können die wichtigsten Eckwerte eines Versicherungsverhältnisses erfassen."
|
|
|
|
class Meta:
|
|
model = PerformanceObjectiveBlock
|
|
|
|
|
|
class AssignmentFactory(wagtail_factories.PageFactory):
|
|
title = "Auftrag"
|
|
starting_position = replace_whitespace(
|
|
"""
|
|
Jemand aus deiner Familie oder aus deinem Freundeskreis möchte sein
|
|
Versicherungspolice überprüfen lassen. Diese Person kommt nun mit ihrer Police auf dich zu
|
|
und bittet dich als Versicherungsprofi, diese kritisch zu überprüfen und ihr gg. Anpassungsvorschläge
|
|
zu unterbreiten. In diesem Kompetenznachweis kannst du nun dein Wissen und Können im Bereich
|
|
der Motorfahrzeugversicherung unter Beweis stellen.
|
|
"""
|
|
)
|
|
|
|
class Meta:
|
|
model = Assignment
|
|
|
|
|
|
class AssignmentListPageFactory(wagtail_factories.PageFactory):
|
|
title = "Aufträge"
|
|
|
|
class Meta:
|
|
model = AssignmentListPage
|