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(
|
||||
email="bianca.musterfrau@vbv-afa.ch",
|
||||
email="bianca.muster@vbv-afa.ch",
|
||||
first_name="Bianca",
|
||||
last_name="Musterfrau",
|
||||
last_name="Muster",
|
||||
avatar_url="/static/avatars/avatar_bianca.png",
|
||||
password="myvbv1234",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ from vbv_lernwelt.learnpath.tests.learning_path_factories import (
|
|||
VideoBlockFactory,
|
||||
)
|
||||
|
||||
# todo: remove when all Handlungsfelder are ready
|
||||
READY_HF = ["Fahrzeug", "Reisen"]
|
||||
|
||||
|
||||
def create_default_learning_path(user=None, skip_locales=True):
|
||||
if user is None:
|
||||
|
|
@ -806,18 +809,25 @@ def create_standard_learning_unit(
|
|||
course_id=COURSE_VERSICHERUNGSVERMITTLERIN_ID, title=category_name
|
||||
),
|
||||
)
|
||||
LearningContentFactory(
|
||||
title=f"Mediathek {category_name}",
|
||||
parent=parent,
|
||||
contents=[
|
||||
(
|
||||
"media_library",
|
||||
MediaLibraryBlockFactory(
|
||||
url=f"/media/versicherungsvermittlerin-media/category/{slugify(category_name)}"
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
if category_name in READY_HF:
|
||||
LearningContentFactory(
|
||||
title=f"Mediathek {category_name}",
|
||||
parent=parent,
|
||||
contents=[
|
||||
(
|
||||
"media_library",
|
||||
MediaLibraryBlockFactory(
|
||||
url=f"/media/versicherungsvermittlerin-media/category/{slugify(category_name)}"
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
else:
|
||||
LearningContentFactory(
|
||||
title="Mediathek",
|
||||
parent=parent,
|
||||
)
|
||||
|
||||
if wbt_url is None:
|
||||
LearningContentFactory(
|
||||
|
|
|
|||
|
|
@ -286,9 +286,10 @@ Diese können negative Folgen verschiedener Art nach sich ziehen, darunter recht
|
|||
),
|
||||
)
|
||||
else:
|
||||
media_category = MediaCategoryPageFactory(
|
||||
overview_icon=overview_icon,
|
||||
title=cat.title,
|
||||
course_category=cat,
|
||||
parent=media_lib_page,
|
||||
)
|
||||
pass
|
||||
# media_category = MediaCategoryPageFactory(
|
||||
# overview_icon=overview_icon,
|
||||
# title=cat.title,
|
||||
# course_category=cat,
|
||||
# parent=media_lib_page,
|
||||
# )
|
||||
|
|
|
|||
Loading…
Reference in New Issue