Make formatter happy

This commit is contained in:
Ramon Wenger 2022-12-08 17:20:47 +01:00
parent 865e0d80f6
commit c64bc463db
6 changed files with 203 additions and 25 deletions

View File

@ -28,12 +28,12 @@ from vbv_lernwelt.course.views import (
request_course_completion,
request_course_completion_for_user,
)
from vbv_lernwelt.feedback.views import get_name
from wagtail import urls as wagtail_urls
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls
from vbv_lernwelt.feedback.views import get_name
def raise_example_error(request):
"""

View File

@ -1,5 +1,5 @@
from graphene_django.rest_framework.mutation import SerializerMutation
import graphene
from graphene_django.rest_framework.mutation import SerializerMutation
from vbv_lernwelt.feedback.serializers import FeedbackResponseSerializer

View File

@ -1,8 +1,9 @@
# Generated by Django 3.2.13 on 2022-12-08 15:59
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models
import vbv_lernwelt.feedback.models
@ -11,26 +12,95 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('learnpath', '0009_alter_learningcontent_contents'),
("learnpath", "0009_alter_learningcontent_contents"),
]
operations = [
migrations.CreateModel(
name='FeedbackResponse',
name="FeedbackResponse",
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('satisfaction', vbv_lernwelt.feedback.models.FeedbackIntegerField(null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4), django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4)])),
('goal_attainment', vbv_lernwelt.feedback.models.FeedbackIntegerField(null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4), django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4)])),
('proficiency', models.IntegerField(null=True)),
('received_materials', models.BooleanField(null=True)),
('materials_rating', vbv_lernwelt.feedback.models.FeedbackIntegerField(null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4), django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4)])),
('instructor_competence', vbv_lernwelt.feedback.models.FeedbackIntegerField(null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4), django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4)])),
('instructor_respect', vbv_lernwelt.feedback.models.FeedbackIntegerField(null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4), django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4)])),
('instructor_open_feedback', models.TextField(blank=True)),
('would_recommend', models.BooleanField(null=True)),
('course_positive_feedback', models.TextField(blank=True)),
('course_negative_feedback', models.TextField(blank=True)),
('circle', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='learnpath.circle')),
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"satisfaction",
vbv_lernwelt.feedback.models.FeedbackIntegerField(
null=True,
validators=[
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(4),
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(4),
],
),
),
(
"goal_attainment",
vbv_lernwelt.feedback.models.FeedbackIntegerField(
null=True,
validators=[
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(4),
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(4),
],
),
),
("proficiency", models.IntegerField(null=True)),
("received_materials", models.BooleanField(null=True)),
(
"materials_rating",
vbv_lernwelt.feedback.models.FeedbackIntegerField(
null=True,
validators=[
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(4),
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(4),
],
),
),
(
"instructor_competence",
vbv_lernwelt.feedback.models.FeedbackIntegerField(
null=True,
validators=[
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(4),
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(4),
],
),
),
(
"instructor_respect",
vbv_lernwelt.feedback.models.FeedbackIntegerField(
null=True,
validators=[
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(4),
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(4),
],
),
),
("instructor_open_feedback", models.TextField(blank=True)),
("would_recommend", models.BooleanField(null=True)),
("course_positive_feedback", models.TextField(blank=True)),
("course_negative_feedback", models.TextField(blank=True)),
(
"circle",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to="learnpath.circle",
),
),
],
),
]

View File

@ -1,4 +1,5 @@
from wagtail.core import hooks
from .graphql.mutations import Mutation

View File

@ -1,20 +1,126 @@
# Generated by Django 3.2.13 on 2022-12-08 09:55
from django.db import migrations
import wagtail.blocks
import wagtail.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('learnpath', '0008_alter_learningcontent_contents'),
("learnpath", "0008_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()), ('text', wagtail.blocks.RichTextBlock(required=False))])), ('exercise', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('learningmodule', 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()), ('text', wagtail.blocks.RichTextBlock(required=False))])), ('placeholder', wagtail.blocks.StructBlock([('description', wagtail.blocks.TextBlock()), ('url', wagtail.blocks.TextBlock())])), ('feedback', wagtail.blocks.StructBlock([]))], use_json_field=None),
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()),
("text", wagtail.blocks.RichTextBlock(required=False)),
]
),
),
(
"exercise",
wagtail.blocks.StructBlock(
[
("description", wagtail.blocks.TextBlock()),
("url", wagtail.blocks.TextBlock()),
]
),
),
(
"learningmodule",
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()),
("text", wagtail.blocks.RichTextBlock(required=False)),
]
),
),
(
"placeholder",
wagtail.blocks.StructBlock(
[
("description", wagtail.blocks.TextBlock()),
("url", wagtail.blocks.TextBlock()),
]
),
),
("feedback", wagtail.blocks.StructBlock([])),
],
use_json_field=None,
),
),
]

View File

@ -14,7 +14,8 @@ from vbv_lernwelt.learnpath.models_learning_unit_content import (
BookBlock,
DocumentBlock,
ExerciseBlock,
FeedbackBlock, LearningModuleBlock,
FeedbackBlock,
LearningModuleBlock,
MediaLibraryBlock,
OnlineTrainingBlock,
PlaceholderBlock,