Refactor Circle data model
This commit is contained in:
parent
4ce3b5f005
commit
20d10da944
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated by Django 3.2.12 on 2022-06-01 15:39
|
# Generated by Django 3.2.12 on 2022-06-03 13:11
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
|
@ -52,6 +52,7 @@ class Migration(migrations.Migration):
|
||||||
name='LearningSequence',
|
name='LearningSequence',
|
||||||
fields=[
|
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')),
|
('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')),
|
||||||
|
('icon', models.CharField(default='IconLsStart', max_length=255)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'verbose_name': 'Learning Sequence',
|
'verbose_name': 'Learning Sequence',
|
||||||
|
|
@ -62,7 +63,9 @@ class Migration(migrations.Migration):
|
||||||
name='LearningUnit',
|
name='LearningUnit',
|
||||||
fields=[
|
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')),
|
('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')),
|
||||||
('contents', wagtail.core.fields.StreamField([('web_based_training', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())])), ('video', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock())]))], blank=True, null=True)),
|
('minutes', models.PositiveIntegerField(default=15)),
|
||||||
|
('package', models.CharField(blank=True, default='', max_length=255)),
|
||||||
|
('contents', wagtail.core.fields.StreamField([('video', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('rise_training', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('podcast', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock()), ('url', wagtail.core.blocks.URLBlock())])), ('competence', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock())])), ('exercise', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock())])), ('self_evaluation', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock())])), ('document', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock())])), ('knowledge', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.TextBlock())]))])),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'verbose_name': 'Learning Unit',
|
'verbose_name': 'Learning Unit',
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ from wagtail.core.fields import StreamField
|
||||||
from wagtail.core.models import Page, Orderable
|
from wagtail.core.models import Page, Orderable
|
||||||
|
|
||||||
from vbv_lernwelt.learnpath.models_competences import *
|
from vbv_lernwelt.learnpath.models_competences import *
|
||||||
from vbv_lernwelt.learnpath.models_learning_unit_content import WebBasedTrainingBlock, VideoBlock
|
from vbv_lernwelt.learnpath.models_learning_unit_content import RiseTrainingBlock, VideoBlock, PodcastBlock, \
|
||||||
|
CompetenceBlock, ExerciseBlock, SelfEvaluationBlock, DocumentBlock, KnowledgeBlock
|
||||||
from vbv_lernwelt.learnpath.serializer_helpers import get_it_serializer_class
|
from vbv_lernwelt.learnpath.serializer_helpers import get_it_serializer_class
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -106,9 +107,14 @@ class Circle(Page):
|
||||||
|
|
||||||
|
|
||||||
class LearningSequence(Page):
|
class LearningSequence(Page):
|
||||||
|
icon = models.CharField(max_length=255, default="IconLsStart")
|
||||||
|
|
||||||
parent_page_types = ['learnpath.Circle']
|
parent_page_types = ['learnpath.Circle']
|
||||||
|
|
||||||
panels = [FieldPanel('title'), FieldPanel('circle')]
|
panels = [
|
||||||
|
FieldPanel('title'),
|
||||||
|
FieldPanel('icon'),
|
||||||
|
]
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = "Learning Sequence"
|
verbose_name = "Learning Sequence"
|
||||||
|
|
@ -118,10 +124,10 @@ class LearningSequence(Page):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_serializer_class(cls):
|
def get_serializer_class(cls):
|
||||||
return get_it_serializer_class(cls, field_names=['id', 'title', 'slug', 'type', 'translation_key'])
|
return get_it_serializer_class(cls, field_names=['id', 'title', 'icon', 'slug', 'type', 'translation_key'])
|
||||||
|
|
||||||
def get_admin_display_title(self):
|
def get_admin_display_title(self):
|
||||||
return f'Lernsequenz: {self.draft_title}'
|
return f'{self.icon} {self.draft_title}'
|
||||||
|
|
||||||
def full_clean(self, *args, **kwargs):
|
def full_clean(self, *args, **kwargs):
|
||||||
super(LearningSequence, self).full_clean(*args, **kwargs)
|
super(LearningSequence, self).full_clean(*args, **kwargs)
|
||||||
|
|
@ -135,29 +141,42 @@ class LearningUnit(Page):
|
||||||
# TODO: Review model architecture, is the stream field the right thing here?
|
# TODO: Review model architecture, is the stream field the right thing here?
|
||||||
parent_page_types = ['learnpath.Circle']
|
parent_page_types = ['learnpath.Circle']
|
||||||
subpage_types = []
|
subpage_types = []
|
||||||
|
minutes = models.PositiveIntegerField(default=15)
|
||||||
|
package = models.CharField(max_length=255, default="", blank=True)
|
||||||
|
|
||||||
content_blocks = [
|
content_blocks = [
|
||||||
('web_based_training', WebBasedTrainingBlock()),
|
|
||||||
('video', VideoBlock()),
|
('video', VideoBlock()),
|
||||||
|
('rise_training', RiseTrainingBlock()),
|
||||||
|
('podcast', PodcastBlock()),
|
||||||
|
('competence', CompetenceBlock()),
|
||||||
|
('exercise', ExerciseBlock()),
|
||||||
|
('self_evaluation', SelfEvaluationBlock()),
|
||||||
|
('document', DocumentBlock()),
|
||||||
|
('knowledge', KnowledgeBlock()),
|
||||||
]
|
]
|
||||||
|
|
||||||
contents = StreamField(
|
contents = StreamField(
|
||||||
StreamBlock(content_blocks), null=True, blank=True, min_num=1, max_num=1
|
StreamBlock(content_blocks), blank=False, min_num=1, max_num=1
|
||||||
)
|
)
|
||||||
|
|
||||||
content_panels = [
|
content_panels = [
|
||||||
FieldPanel('title', classname="full title"),
|
FieldPanel('title', classname="full title"),
|
||||||
# FieldPanel('learning_sequence'),
|
FieldPanel('minutes'),
|
||||||
StreamFieldPanel('contents'),
|
StreamFieldPanel('contents'),
|
||||||
]
|
]
|
||||||
|
|
||||||
api_fields = [
|
|
||||||
APIField('title'),
|
|
||||||
APIField('contents'),
|
|
||||||
]
|
|
||||||
|
|
||||||
def get_admin_display_title(self):
|
def get_admin_display_title(self):
|
||||||
return f'FOOBAR {self.draft_title}'
|
display_title = ''
|
||||||
|
|
||||||
|
if self.package:
|
||||||
|
display_title += f'{self.package}: '
|
||||||
|
|
||||||
|
if len(self.contents) > 0:
|
||||||
|
display_title += f'{self.contents[0].block_type.capitalize()}: '
|
||||||
|
|
||||||
|
display_title += self.draft_title
|
||||||
|
|
||||||
|
return display_title
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = "Learning Unit"
|
verbose_name = "Learning Unit"
|
||||||
|
|
@ -168,7 +187,7 @@ class LearningUnit(Page):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_serializer_class(cls):
|
def get_serializer_class(cls):
|
||||||
return get_it_serializer_class(cls, field_names=['id', 'title', 'contents', 'slug', 'type', 'translation_key'])
|
return get_it_serializer_class(cls, field_names=['id', 'title', 'minutes', 'package', 'contents', 'slug', 'type', 'translation_key'])
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.title}"
|
return f"{self.title}"
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,61 @@
|
||||||
from django.db import models
|
|
||||||
from wagtail.core import blocks
|
from wagtail.core import blocks
|
||||||
|
|
||||||
|
|
||||||
class VideoBlock(blocks.StructBlock):
|
class VideoBlock(blocks.StructBlock):
|
||||||
# TODO: Possible video Types for the user, upload file, add URL
|
# TODO: Possible video Types for the user, upload file, add URL
|
||||||
title = models.CharField(max_length=255, default="")
|
description = blocks.TextBlock()
|
||||||
description = models.TextField(default="")
|
|
||||||
url = blocks.URLBlock()
|
url = blocks.URLBlock()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
icon = 'media'
|
icon = 'media'
|
||||||
|
|
||||||
|
|
||||||
RISE = 'rise'
|
class RiseTrainingBlock(blocks.StructBlock):
|
||||||
|
description = blocks.TextBlock()
|
||||||
CONTENT_TYPE_CHOICES = (
|
|
||||||
(RISE, 'Rise'),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class WebBasedTrainingBlock(blocks.StructBlock):
|
|
||||||
url = blocks.URLBlock()
|
url = blocks.URLBlock()
|
||||||
content_type = models.CharField(
|
|
||||||
max_length=255,
|
class Meta:
|
||||||
choices=CONTENT_TYPE_CHOICES,
|
icon = 'media'
|
||||||
default=RISE
|
|
||||||
)
|
|
||||||
|
class PodcastBlock(blocks.StructBlock):
|
||||||
|
description = blocks.TextBlock()
|
||||||
|
url = blocks.URLBlock()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
icon = 'media'
|
||||||
|
|
||||||
|
|
||||||
|
class CompetenceBlock(blocks.StructBlock):
|
||||||
|
description = blocks.TextBlock()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
icon = 'media'
|
||||||
|
|
||||||
|
|
||||||
|
class ExerciseBlock(blocks.StructBlock):
|
||||||
|
description = blocks.TextBlock()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
icon = 'media'
|
||||||
|
|
||||||
|
|
||||||
|
class SelfEvaluationBlock(blocks.StructBlock):
|
||||||
|
description = blocks.TextBlock()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
icon = 'media'
|
||||||
|
|
||||||
|
|
||||||
|
class DocumentBlock(blocks.StructBlock):
|
||||||
|
description = blocks.TextBlock()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
icon = 'media'
|
||||||
|
|
||||||
|
|
||||||
|
class KnowledgeBlock(blocks.StructBlock):
|
||||||
|
description = blocks.TextBlock()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
icon = 'media'
|
icon = 'media'
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ from wagtail.core.models import Site, Page
|
||||||
from vbv_lernwelt.core.admin import User
|
from vbv_lernwelt.core.admin import User
|
||||||
from vbv_lernwelt.learnpath.models import LearningPath, Topic, Circle, LearningSequence, LearningUnit
|
from vbv_lernwelt.learnpath.models import LearningPath, Topic, Circle, LearningSequence, LearningUnit
|
||||||
from vbv_lernwelt.learnpath.tests.learning_path_factories import LearningPathFactory, TopicFactory, CircleFactory, \
|
from vbv_lernwelt.learnpath.tests.learning_path_factories import LearningPathFactory, TopicFactory, CircleFactory, \
|
||||||
LearningSequenceFactory, LearningUnitFactory, VideoBlockFactory, WebBasedTrainingBlockFactory
|
LearningSequenceFactory, LearningUnitFactory, VideoBlockFactory, PodcastBlockFactory, CompetenceBlockFactory, \
|
||||||
|
ExerciseBlockFactory, SelfEvaluationBlockFactory, DocumentBlockFactory
|
||||||
|
|
||||||
|
|
||||||
def create_default_learning_path(user=None):
|
def create_default_learning_path(user=None):
|
||||||
|
|
@ -53,7 +54,8 @@ von Neukunden zu benützen
|
||||||
|
|
||||||
tp = TopicFactory(title="Beraten der Kunden", learning_path=lp)
|
tp = TopicFactory(title="Beraten der Kunden", learning_path=lp)
|
||||||
circle_3 = CircleFactory(title="Einstieg", parent=lp, topic=tp)
|
circle_3 = CircleFactory(title="Einstieg", parent=lp, topic=tp)
|
||||||
circle_4 = CircleFactory(title="Analyse", parent=lp, topic=tp,
|
|
||||||
|
circe_analyse = CircleFactory(title="Analyse", parent=lp, topic=tp,
|
||||||
description="""Nach dem Gespräch werten sie die Analyse aus und erstellen mit den
|
description="""Nach dem Gespräch werten sie die Analyse aus und erstellen mit den
|
||||||
zur Verfügung stehenden Systemen formal korrekte Lösungsvorschläge bzw.
|
zur Verfügung stehenden Systemen formal korrekte Lösungsvorschläge bzw.
|
||||||
Ausschreibungen. Je nach Komplexität der Situation ziehen sie die nötigen
|
Ausschreibungen. Je nach Komplexität der Situation ziehen sie die nötigen
|
||||||
|
|
@ -66,71 +68,217 @@ von Neukunden zu benützen
|
||||||
— Lösungsvorschläge zu skizzieren und
|
— Lösungsvorschläge zu skizzieren und
|
||||||
zu visualisieren""")
|
zu visualisieren""")
|
||||||
|
|
||||||
sequence_1 = LearningSequenceFactory(title="Starten", parent=circle_4)
|
LearningSequenceFactory(title='Starten', parent=circe_analyse)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Einleitung Circle "Anlayse"',
|
||||||
|
parent=circe_analyse,
|
||||||
|
minutes=15,
|
||||||
|
contents=[('video', VideoBlockFactory())]
|
||||||
|
)
|
||||||
|
|
||||||
learning_unit = LearningUnitFactory(title='Einleitung Circle "Anlayse"', parent=circle_4)
|
LearningSequenceFactory(title='Beobachten', parent=circe_analyse, icon='IconLsWatch')
|
||||||
learning_unit = LearningUnitFactory.create(title='** Einstieg Video"', parent=circle_4)
|
LearningUnitFactory(
|
||||||
video_url = "https://www.vbv.ch/fileadmin/vbv/Videos/Statements_Externe/Janos_M/Testimonial_Janos_Mischler_PositiveEffekte.mp4"
|
title='Ermittlung des Kundenbedarfs',
|
||||||
video_title = "Ausbildung ist pflicht"
|
parent=circe_analyse,
|
||||||
video_description = "Erfahren Sie, was für Janos Mischler die positiven Aspekte von ständiger Weiterbildung sind – aus fachlicher und aus persönlicher Sicht."
|
package='Absicherung der Familie',
|
||||||
video_block = VideoBlockFactory(content_type="video", url=video_url, title=video_title, description=video_description)
|
minutes=30,
|
||||||
learning_unit.contents.append(('video', video_block))
|
contents=[('podcast', PodcastBlockFactory())]
|
||||||
learning_unit.save()
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Kundenbedürfnisse erkennen',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Absicherung der Familie',
|
||||||
|
minutes=30,
|
||||||
|
contents=[('competence', CompetenceBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Was braucht eine Familie?',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Absicherung der Familie',
|
||||||
|
minutes=60,
|
||||||
|
contents=[('exercise', ExerciseBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Selbsteinschätzung',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Absicherung der Familie',
|
||||||
|
minutes=0,
|
||||||
|
contents=[('self_evaluation', SelfEvaluationBlockFactory())]
|
||||||
|
)
|
||||||
|
|
||||||
learning_unit = LearningUnitFactory.create(title='** Web Based Training"', parent=circle_4)
|
LearningSequenceFactory(title='Anwenden', parent=circe_analyse, icon='IconLsApply')
|
||||||
wbt_url = "web_based_trainings/rise_cmi5_test_export/scormcontent/index.html"
|
LearningUnitFactory(
|
||||||
wbt_block = WebBasedTrainingBlockFactory(content_type="web_based_training", url=wbt_url)
|
title='Versicherungsbedarf für Familien',
|
||||||
learning_unit.contents.append(('web_based_training', wbt_block))
|
parent=circe_analyse,
|
||||||
learning_unit.save()
|
package='Prämien einsparen',
|
||||||
learning_unit = LearningUnitFactory.create(title="Selbsteinschätzung", parent=circle_4)
|
minutes=60,
|
||||||
|
contents=[('exercise', ExerciseBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Alles klar?',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Prämien einsparen',
|
||||||
|
minutes=60,
|
||||||
|
contents=[('exercise', ExerciseBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Selbsteinschätzung',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Prämien einsparen',
|
||||||
|
minutes=0,
|
||||||
|
contents=[('self_evaluation', SelfEvaluationBlockFactory())]
|
||||||
|
)
|
||||||
|
|
||||||
sequence_2 = LearningSequenceFactory.create(title="Beobachten", parent=circle_4)
|
LearningUnitFactory(
|
||||||
learning_unit = LearningUnitFactory.create(title="Mein Motorfahrzeug kaufen", parent=circle_4)
|
title='GmbH oder AG',
|
||||||
learning_unit = LearningUnitFactory.create(title="Sich selbständig machen", parent=circle_4)
|
parent=circe_analyse,
|
||||||
|
package='Sich selbständig machen',
|
||||||
|
minutes=120,
|
||||||
|
contents=[('video', VideoBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Tiertherapie Patrizia Feller',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Sich selbständig machen',
|
||||||
|
minutes=120,
|
||||||
|
contents=[('exercise', ExerciseBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Selbsteinschätzung',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Sich selbständig machen',
|
||||||
|
minutes=0,
|
||||||
|
contents=[('self_evaluation', SelfEvaluationBlockFactory())]
|
||||||
|
)
|
||||||
|
|
||||||
sequence_3 = LearningSequenceFactory.create(title="Anwenden", parent=circle_4)
|
LearningUnitFactory(
|
||||||
learning_unit = LearningUnitFactory.create(title="Nora kauft sich ein neues Auto", parent=circle_4)
|
title='Motorfahrzeugversicherung',
|
||||||
learning_unit = LearningUnitFactory.create(title="Manuel träumt von einem neuen Tesla", parent=circle_4)
|
parent=circe_analyse,
|
||||||
learning_unit = LearningUnitFactory.create(title="Deine Erkenntnisse und Learnings", parent=circle_4)
|
package='Auto verkaufen',
|
||||||
|
minutes=240,
|
||||||
|
contents=[('competence', CompetenceBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Nora kauft sich ein neues Auto',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Auto verkaufen',
|
||||||
|
minutes=60,
|
||||||
|
contents=[('podcast', PodcastBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Ermittlung des Kundenbedarfs',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Auto verkaufen',
|
||||||
|
minutes=120,
|
||||||
|
contents=[('document', DocumentBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Motorfahrzeug kaufen',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Auto verkaufen',
|
||||||
|
minutes=120,
|
||||||
|
contents=[('exercise', ExerciseBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Selbsteinschätzung',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Auto verkaufen',
|
||||||
|
minutes=0,
|
||||||
|
contents=[('self_evaluation', SelfEvaluationBlockFactory())]
|
||||||
|
)
|
||||||
|
|
||||||
sequence_4 = LearningSequenceFactory.create(title="Üben", parent=circle_4)
|
LearningSequenceFactory(title='Üben', parent=circe_analyse, icon='IconLsPractice')
|
||||||
learning_unit = LearningUnitFactory.create(title="Ermittlung des Kundenbedarfs", parent=circle_4)
|
LearningUnitFactory(
|
||||||
learning_unit = LearningUnitFactory.create(title="Aktives Zuhören", parent=circle_4)
|
title='Hausrat',
|
||||||
learning_unit = LearningUnitFactory.create(title="In Bildern Sprechen", parent=circle_4)
|
parent=circe_analyse,
|
||||||
learning_unit = LearningUnitFactory.create(title="Priorisieren des Bedarfs", parent=circle_4)
|
package='Kind zieht von zu Hause aus',
|
||||||
learning_unit = LearningUnitFactory.create(title="Zusammenfassung des Bedarfs", parent=circle_4)
|
minutes=120,
|
||||||
|
contents=[('competence', CompetenceBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Privathaftpflicht',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Kind zieht von zu Hause aus',
|
||||||
|
minutes=60,
|
||||||
|
contents=[('competence', CompetenceBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Kind zieht von zu Hause aus',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Kind zieht von zu Hause aus',
|
||||||
|
minutes=60,
|
||||||
|
contents=[('competence', CompetenceBlockFactory())]
|
||||||
|
)
|
||||||
|
LearningUnitFactory(
|
||||||
|
title='Selbsteinschätzung',
|
||||||
|
parent=circe_analyse,
|
||||||
|
package='Kind zieht von zu Hause aus',
|
||||||
|
minutes=0,
|
||||||
|
contents=[('self_evaluation', SelfEvaluationBlockFactory())]
|
||||||
|
)
|
||||||
|
|
||||||
sequence_5 = LearningSequenceFactory.create(title="Testen", parent=circle_4)
|
# learning_unit = LearningUnitFactory.create(title='** Einstieg Video"', parent=circle_4)
|
||||||
learning_unit = LearningUnitFactory.create(title="Bedarfsfragen", parent=circle_4)
|
# video_url = "https://www.vbv.ch/fileadmin/vbv/Videos/Statements_Externe/Janos_M/Testimonial_Janos_Mischler_PositiveEffekte.mp4"
|
||||||
learning_unit = LearningUnitFactory.create(title="Andwendung der Fragetechniken", parent=circle_4)
|
# video_title = "Ausbildung ist pflicht"
|
||||||
|
# video_description = "Erfahren Sie, was für Janos Mischler die positiven Aspekte von ständiger Weiterbildung sind – aus fachlicher und aus persönlicher Sicht."
|
||||||
sequence_5 = LearningSequenceFactory.create(title="Vernetzen", parent=circle_4)
|
# video_block = VideoBlockFactory(content_type="video", url=video_url, title=video_title, description=video_description)
|
||||||
learning_unit = LearningUnitFactory.create(title="Online Training", parent=circle_4)
|
# learning_unit.contents.append(('video', video_block))
|
||||||
|
# learning_unit.save()
|
||||||
sequence_6 = LearningSequenceFactory.create(title="Beenden", parent=circle_4)
|
#
|
||||||
learning_unit = LearningUnitFactory.create(title="Selbsteinschätzung", parent=circle_4)
|
# learning_unit = LearningUnitFactory.create(title='** Web Based Training"', parent=circle_4)
|
||||||
|
# wbt_url = "web_based_trainings/rise_cmi5_test_export/scormcontent/index.html"
|
||||||
circle_5 = CircleFactory.create(title="Lösung",
|
# wbt_block = WebBasedTrainingBlockFactory(content_type="web_based_training", url=wbt_url)
|
||||||
parent=lp,
|
# learning_unit.contents.append(('web_based_training', wbt_block))
|
||||||
topic=tp,
|
# learning_unit.save()
|
||||||
goals="""— Die Daten des Kunden korrekt in die notwendigen Systeme einzutragen
|
# learning_unit = LearningUnitFactory.create(title="Selbsteinschätzung", parent=circle_4)
|
||||||
— Fachspezialisten beizuziehen, falls dies angezeigt ist
|
#
|
||||||
— Mit den zur Verfügung stehenden Systemen korrekte Lösungsvorschläge
|
# sequence_2 = LearningSequenceFactory.create(title="Beobachten", parent=circle_4)
|
||||||
(z.B. Offerten oder Ausschreibungen) zu verfassen
|
# learning_unit = LearningUnitFactory.create(title="Mein Motorfahrzeug kaufen", parent=circle_4)
|
||||||
— Falls nötig die Lösungsvorschläge dem Underwriting weiterzuleiten und
|
# learning_unit = LearningUnitFactory.create(title="Sich selbständig machen", parent=circle_4)
|
||||||
Unklarheiten zu bereinigen """)
|
#
|
||||||
|
# sequence_3 = LearningSequenceFactory.create(title="Anwenden", parent=circle_4)
|
||||||
circle_6 = CircleFactory.create(title="Abschluss",
|
# learning_unit = LearningUnitFactory.create(title="Nora kauft sich ein neues Auto", parent=circle_4)
|
||||||
parent=lp,
|
# learning_unit = LearningUnitFactory.create(title="Manuel träumt von einem neuen Tesla", parent=circle_4)
|
||||||
topic=tp,
|
# learning_unit = LearningUnitFactory.create(title="Deine Erkenntnisse und Learnings", parent=circle_4)
|
||||||
goals="""— Je nach Komplexität der Lösungsvorschläge (z.B. Offerten oder Offertvergleich) einen Fachspezialisten aufzubieten
|
#
|
||||||
— Sich kundenorientiert auf das Gespräch vorzubereiten und sich passend zu präsentieren""")
|
# sequence_4 = LearningSequenceFactory.create(title="Üben", parent=circle_4)
|
||||||
|
# learning_unit = LearningUnitFactory.create(title="Ermittlung des Kundenbedarfs", parent=circle_4)
|
||||||
tp = TopicFactory.create(title="Betreuen und Ausbauen des Kundenstamms", learning_path=lp)
|
# learning_unit = LearningUnitFactory.create(title="Aktives Zuhören", parent=circle_4)
|
||||||
circle_7 = CircleFactory.create(title="Betreuen", parent=lp, topic=tp)
|
# learning_unit = LearningUnitFactory.create(title="In Bildern Sprechen", parent=circle_4)
|
||||||
|
# learning_unit = LearningUnitFactory.create(title="Priorisieren des Bedarfs", parent=circle_4)
|
||||||
tp = TopicFactory.create(title="Prüfung", is_visible=False, learning_path=lp)
|
# learning_unit = LearningUnitFactory.create(title="Zusammenfassung des Bedarfs", parent=circle_4)
|
||||||
circle_7 = CircleFactory.create(title="Prüfungsvorbereitung", parent=lp, topic=tp)
|
#
|
||||||
|
# sequence_5 = LearningSequenceFactory.create(title="Testen", parent=circle_4)
|
||||||
|
# learning_unit = LearningUnitFactory.create(title="Bedarfsfragen", parent=circle_4)
|
||||||
|
# learning_unit = LearningUnitFactory.create(title="Andwendung der Fragetechniken", parent=circle_4)
|
||||||
|
#
|
||||||
|
# sequence_5 = LearningSequenceFactory.create(title="Vernetzen", parent=circle_4)
|
||||||
|
# learning_unit = LearningUnitFactory.create(title="Online Training", parent=circle_4)
|
||||||
|
#
|
||||||
|
# sequence_6 = LearningSequenceFactory.create(title="Beenden", parent=circle_4)
|
||||||
|
# learning_unit = LearningUnitFactory.create(title="Selbsteinschätzung", parent=circle_4)
|
||||||
|
#
|
||||||
|
# circle_5 = CircleFactory.create(title="Lösung",
|
||||||
|
# parent=lp,
|
||||||
|
# topic=tp,
|
||||||
|
# goals="""— Die Daten des Kunden korrekt in die notwendigen Systeme einzutragen
|
||||||
|
# — Fachspezialisten beizuziehen, falls dies angezeigt ist
|
||||||
|
# — Mit den zur Verfügung stehenden Systemen korrekte Lösungsvorschläge
|
||||||
|
# (z.B. Offerten oder Ausschreibungen) zu verfassen
|
||||||
|
# — Falls nötig die Lösungsvorschläge dem Underwriting weiterzuleiten und
|
||||||
|
# Unklarheiten zu bereinigen """)
|
||||||
|
#
|
||||||
|
# circle_6 = CircleFactory.create(title="Abschluss",
|
||||||
|
# parent=lp,
|
||||||
|
# topic=tp,
|
||||||
|
# goals="""— Je nach Komplexität der Lösungsvorschläge (z.B. Offerten oder Offertvergleich) einen Fachspezialisten aufzubieten
|
||||||
|
# — Sich kundenorientiert auf das Gespräch vorzubereiten und sich passend zu präsentieren""")
|
||||||
|
#
|
||||||
|
# tp = TopicFactory.create(title="Betreuen und Ausbauen des Kundenstamms", learning_path=lp)
|
||||||
|
# circle_7 = CircleFactory.create(title="Betreuen", parent=lp, topic=tp)
|
||||||
|
#
|
||||||
|
# tp = TopicFactory.create(title="Prüfung", is_visible=False, learning_path=lp)
|
||||||
|
# circle_7 = CircleFactory.create(title="Prüfungsvorbereitung", parent=lp, topic=tp)
|
||||||
|
|
||||||
# all pages belong to 'admin' by default
|
# all pages belong to 'admin' by default
|
||||||
Page.objects.update(owner=user)
|
Page.objects.update(owner=user)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@ import factory
|
||||||
import wagtail_factories
|
import wagtail_factories
|
||||||
|
|
||||||
from vbv_lernwelt.learnpath.models import LearningPath, Topic, Circle, LearningSequence, LearningUnit
|
from vbv_lernwelt.learnpath.models import LearningPath, Topic, Circle, LearningSequence, LearningUnit
|
||||||
from vbv_lernwelt.learnpath.models_learning_unit_content import VideoBlock, WebBasedTrainingBlock
|
from vbv_lernwelt.learnpath.models_learning_unit_content import VideoBlock, RiseTrainingBlock, PodcastBlock, \
|
||||||
|
CompetenceBlock, ExerciseBlock, SelfEvaluationBlock, DocumentBlock, KnowledgeBlock
|
||||||
|
|
||||||
|
|
||||||
class LearningPathFactory(wagtail_factories.PageFactory):
|
class LearningPathFactory(wagtail_factories.PageFactory):
|
||||||
|
|
@ -42,17 +43,59 @@ class LearningUnitFactory(wagtail_factories.PageFactory):
|
||||||
|
|
||||||
|
|
||||||
class VideoBlockFactory(wagtail_factories.StructBlockFactory):
|
class VideoBlockFactory(wagtail_factories.StructBlockFactory):
|
||||||
title = "Ausbildung ist Pflicht"
|
url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
||||||
url = "https://www.vbv.ch/fileadmin/vbv/Videos/Statements_Externe/Janos_M/Testimonial_Janos_Mischler_PositiveEffekte.mp4"
|
description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = VideoBlock
|
model = VideoBlock
|
||||||
|
|
||||||
|
|
||||||
class WebBasedTrainingBlockFactory(wagtail_factories.StructBlockFactory):
|
class RiseTrainingBlockFactory(wagtail_factories.StructBlockFactory):
|
||||||
title = "Beispiel Rise Modul"
|
url = "https://www.example.com"
|
||||||
|
description = "Beispiel Rise Modul"
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = RiseTrainingBlock
|
||||||
|
|
||||||
|
|
||||||
|
class PodcastBlockFactory(wagtail_factories.StructBlockFactory):
|
||||||
|
description = "Beispiel Podcast"
|
||||||
url = "https://docs.wagtail.org/en/stable/topics/streamfield.html"
|
url = "https://docs.wagtail.org/en/stable/topics/streamfield.html"
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = WebBasedTrainingBlock
|
model = PodcastBlock
|
||||||
|
|
||||||
|
|
||||||
|
class CompetenceBlockFactory(wagtail_factories.StructBlockFactory):
|
||||||
|
description = "Beispiel Kompetenz"
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = CompetenceBlock
|
||||||
|
|
||||||
|
|
||||||
|
class ExerciseBlockFactory(wagtail_factories.StructBlockFactory):
|
||||||
|
description = "Beispiel Aufgabe"
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = ExerciseBlock
|
||||||
|
|
||||||
|
|
||||||
|
class SelfEvaluationBlockFactory(wagtail_factories.StructBlockFactory):
|
||||||
|
description = "Beispiel Selbsteinschätzung"
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = SelfEvaluationBlock
|
||||||
|
|
||||||
|
|
||||||
|
class DocumentBlockFactory(wagtail_factories.StructBlockFactory):
|
||||||
|
description = "Beispiel Dokument"
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = DocumentBlock
|
||||||
|
|
||||||
|
|
||||||
|
class KnowledgeBlockFactory(wagtail_factories.StructBlockFactory):
|
||||||
|
description = "Beispiel Wissen"
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = KnowledgeBlock
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue