Add changes for demo
New user name Hide unfinished HFs Make unfinished HFs in path placeholders
This commit is contained in:
parent
6254e63d01
commit
bd520134f1
|
|
@ -100,9 +100,9 @@ def create_default_users(user_model=User, group_model=Group, default_password=No
|
||||||
)
|
)
|
||||||
|
|
||||||
_create_student_user(
|
_create_student_user(
|
||||||
email="bianca.musterfrau@vbv-afa.ch",
|
email="bianca.muster@vbv-afa.ch",
|
||||||
first_name="Bianca",
|
first_name="Bianca",
|
||||||
last_name="Musterfrau",
|
last_name="Muster",
|
||||||
avatar_url="/static/avatars/avatar_bianca.png",
|
avatar_url="/static/avatars/avatar_bianca.png",
|
||||||
password="myvbv1234",
|
password="myvbv1234",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@ from vbv_lernwelt.learnpath.tests.learning_path_factories import (
|
||||||
VideoBlockFactory,
|
VideoBlockFactory,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# todo: remove when all Handlungsfelder are ready
|
||||||
|
READY_HF = ["Fahrzeug", "Reisen"]
|
||||||
|
|
||||||
|
|
||||||
def create_default_learning_path(user=None, skip_locales=True):
|
def create_default_learning_path(user=None, skip_locales=True):
|
||||||
if user is None:
|
if user is None:
|
||||||
|
|
@ -806,18 +809,25 @@ def create_standard_learning_unit(
|
||||||
course_id=COURSE_VERSICHERUNGSVERMITTLERIN_ID, title=category_name
|
course_id=COURSE_VERSICHERUNGSVERMITTLERIN_ID, title=category_name
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
LearningContentFactory(
|
|
||||||
title=f"Mediathek {category_name}",
|
if category_name in READY_HF:
|
||||||
parent=parent,
|
LearningContentFactory(
|
||||||
contents=[
|
title=f"Mediathek {category_name}",
|
||||||
(
|
parent=parent,
|
||||||
"media_library",
|
contents=[
|
||||||
MediaLibraryBlockFactory(
|
(
|
||||||
url=f"/media/versicherungsvermittlerin-media/category/{slugify(category_name)}"
|
"media_library",
|
||||||
),
|
MediaLibraryBlockFactory(
|
||||||
)
|
url=f"/media/versicherungsvermittlerin-media/category/{slugify(category_name)}"
|
||||||
],
|
),
|
||||||
)
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
LearningContentFactory(
|
||||||
|
title="Mediathek",
|
||||||
|
parent=parent,
|
||||||
|
)
|
||||||
|
|
||||||
if wbt_url is None:
|
if wbt_url is None:
|
||||||
LearningContentFactory(
|
LearningContentFactory(
|
||||||
|
|
|
||||||
|
|
@ -286,9 +286,10 @@ Diese können negative Folgen verschiedener Art nach sich ziehen, darunter recht
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
media_category = MediaCategoryPageFactory(
|
pass
|
||||||
overview_icon=overview_icon,
|
# media_category = MediaCategoryPageFactory(
|
||||||
title=cat.title,
|
# overview_icon=overview_icon,
|
||||||
course_category=cat,
|
# title=cat.title,
|
||||||
parent=media_lib_page,
|
# course_category=cat,
|
||||||
)
|
# parent=media_lib_page,
|
||||||
|
# )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue