Add wbts to lernfpad oktober demo
This commit is contained in:
parent
3bf9e75714
commit
b7e4d83e76
|
|
@ -50,7 +50,7 @@ const block = computed(() => {
|
|||
</button>
|
||||
</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" />
|
||||
</div>
|
||||
|
||||
|
|
@ -69,8 +69,7 @@ const block = computed(() => {
|
|||
</iframe>
|
||||
</div>
|
||||
|
||||
<div v-else-if="block.type === 'media_library'"></div>
|
||||
<p class="mt-4">
|
||||
<p v-else-if="block.type === 'media_library'" class="mt-4">
|
||||
<a :href="block.value.url" target="_blank" class="button btn-primary">
|
||||
{{ learningContent.title }}
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export class LearningPath implements CourseWagtailPage {
|
|||
return new LearningPath(
|
||||
json.id,
|
||||
json.slug,
|
||||
json.title,
|
||||
json.course.title,
|
||||
json.translation_key,
|
||||
json.frontend_url,
|
||||
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:
|
||||
verbose_name = "Topic"
|
||||
|
||||
|
|
@ -198,6 +201,9 @@ class LearningSequence(Page):
|
|||
<span style="margin-left: 8px;">{self.draft_title}</span>
|
||||
</span>"""
|
||||
|
||||
def get_admin_display_title(self):
|
||||
return f"LS: {self.draft_title}"
|
||||
|
||||
def full_clean(self, *args, **kwargs):
|
||||
self.slug = find_slug_with_parent_prefix(self, "ls")
|
||||
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-", "")
|
||||
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
|
||||
def get_serializer_class(cls):
|
||||
from vbv_lernwelt.learnpath.serializers import LearningUnitSerializer
|
||||
|
|
|
|||
Loading…
Reference in New Issue