Add wbts to lernfpad oktober demo
This commit is contained in:
parent
3bf9e75714
commit
b7e4d83e76
|
|
@ -50,7 +50,7 @@ const block = computed(() => {
|
||||||
</button>
|
</button>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div v-if="block.type === 'exercise'" class="h-screen">
|
<div v-if="block.type === 'exercise' || block.type === 'test'" class="h-screen">
|
||||||
<iframe width="100%" height="100%" scrolling="no" :src="block.value.url" />
|
<iframe width="100%" height="100%" scrolling="no" :src="block.value.url" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -69,8 +69,7 @@ const block = computed(() => {
|
||||||
</iframe>
|
</iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="block.type === 'media_library'"></div>
|
<p v-else-if="block.type === 'media_library'" class="mt-4">
|
||||||
<p class="mt-4">
|
|
||||||
<a :href="block.value.url" target="_blank" class="button btn-primary">
|
<a :href="block.value.url" target="_blank" class="button btn-primary">
|
||||||
{{ learningContent.title }}
|
{{ learningContent.title }}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ export class LearningPath implements CourseWagtailPage {
|
||||||
return new LearningPath(
|
return new LearningPath(
|
||||||
json.id,
|
json.id,
|
||||||
json.slug,
|
json.slug,
|
||||||
json.title,
|
json.course.title,
|
||||||
json.translation_key,
|
json.translation_key,
|
||||||
json.frontend_url,
|
json.frontend_url,
|
||||||
json.course.id,
|
json.course.id,
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Generated by Django 3.2.13 on 2022-10-05 10:06
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
import wagtail.blocks
|
||||||
|
import wagtail.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('learnpath', '0002_alter_learningcontent_contents'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='learningcontent',
|
||||||
|
name='contents',
|
||||||
|
field=wagtail.fields.StreamField([('video', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('resource', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('exercise', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('online_training', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('media_library', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('document', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('test', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('book', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('assignment', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('placeholder', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())]))], use_json_field=None),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -87,6 +87,9 @@ class Topic(Page):
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def get_admin_display_title(self):
|
||||||
|
return f"Thema: {self.draft_title}"
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = "Topic"
|
verbose_name = "Topic"
|
||||||
|
|
||||||
|
|
@ -198,6 +201,9 @@ class LearningSequence(Page):
|
||||||
<span style="margin-left: 8px;">{self.draft_title}</span>
|
<span style="margin-left: 8px;">{self.draft_title}</span>
|
||||||
</span>"""
|
</span>"""
|
||||||
|
|
||||||
|
def get_admin_display_title(self):
|
||||||
|
return f"LS: {self.draft_title}"
|
||||||
|
|
||||||
def full_clean(self, *args, **kwargs):
|
def full_clean(self, *args, **kwargs):
|
||||||
self.slug = find_slug_with_parent_prefix(self, "ls")
|
self.slug = find_slug_with_parent_prefix(self, "ls")
|
||||||
super(LearningSequence, self).full_clean(*args, **kwargs)
|
super(LearningSequence, self).full_clean(*args, **kwargs)
|
||||||
|
|
@ -247,6 +253,9 @@ class LearningUnit(Page):
|
||||||
short_slug = self.slug.replace(f"{self.get_parent().slug}-lu-", "")
|
short_slug = self.slug.replace(f"{self.get_parent().slug}-lu-", "")
|
||||||
return f"{self.get_parent().specific.get_frontend_url()}/evaluate/{short_slug}"
|
return f"{self.get_parent().specific.get_frontend_url()}/evaluate/{short_slug}"
|
||||||
|
|
||||||
|
def get_admin_display_title(self):
|
||||||
|
return f"LE: {self.draft_title}"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_serializer_class(cls):
|
def get_serializer_class(cls):
|
||||||
from vbv_lernwelt.learnpath.serializers import LearningUnitSerializer
|
from vbv_lernwelt.learnpath.serializers import LearningUnitSerializer
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue