diff --git a/client/src/gql/graphql.ts b/client/src/gql/graphql.ts index 5c7a561d..82f5ef8b 100644 --- a/client/src/gql/graphql.ts +++ b/client/src/gql/graphql.ts @@ -585,8 +585,25 @@ export type LearningContentEdoniqTestObjectType = CoursePageInterface & Learning translation_key: Scalars['String']['output']; }; -export type LearningContentFeedbackObjectType = CoursePageInterface & LearningContentInterface & { - __typename?: 'LearningContentFeedbackObjectType'; +export type LearningContentFeedbackUkObjectType = CoursePageInterface & LearningContentInterface & { + __typename?: 'LearningContentFeedbackUKObjectType'; + can_user_self_toggle_course_completion: Scalars['Boolean']['output']; + circle?: Maybe; + content_type: Scalars['String']['output']; + content_url: Scalars['String']['output']; + course?: Maybe; + description: Scalars['String']['output']; + frontend_url: Scalars['String']['output']; + id: Scalars['ID']['output']; + live: Scalars['Boolean']['output']; + minutes?: Maybe; + slug: Scalars['String']['output']; + title: Scalars['String']['output']; + translation_key: Scalars['String']['output']; +}; + +export type LearningContentFeedbackVvObjectType = CoursePageInterface & LearningContentInterface & { + __typename?: 'LearningContentFeedbackVVObjectType'; can_user_self_toggle_course_completion: Scalars['Boolean']['output']; circle?: Maybe; content_type: Scalars['String']['output']; @@ -870,7 +887,8 @@ export type Query = { learning_content_assignment?: Maybe; learning_content_attendance_course?: Maybe; learning_content_document_list?: Maybe; - learning_content_feedback?: Maybe; + learning_content_feedback_uk?: Maybe; + learning_content_feedback_vv?: Maybe; learning_content_knowledge_assessment?: Maybe; learning_content_learning_module?: Maybe; learning_content_media_library?: Maybe; @@ -1045,7 +1063,9 @@ type CoursePageFieldsLearningContentDocumentListObjectTypeFragment = { __typenam type CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment = { __typename?: 'LearningContentEdoniqTestObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment' }; -type CoursePageFieldsLearningContentFeedbackObjectTypeFragment = { __typename?: 'LearningContentFeedbackObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsLearningContentFeedbackObjectTypeFragment' }; +type CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment = { __typename?: 'LearningContentFeedbackUKObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment' }; + +type CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment = { __typename?: 'LearningContentFeedbackVVObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment' }; type CoursePageFieldsLearningContentKnowledgeAssessmentObjectTypeFragment = { __typename?: 'LearningContentKnowledgeAssessmentObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsLearningContentKnowledgeAssessmentObjectTypeFragment' }; @@ -1069,7 +1089,7 @@ type CoursePageFieldsPerformanceCriteriaObjectTypeFragment = { __typename?: 'Per type CoursePageFieldsTopicObjectTypeFragment = { __typename?: 'TopicObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsTopicObjectTypeFragment' }; -export type CoursePageFieldsFragment = CoursePageFieldsActionCompetenceObjectTypeFragment | CoursePageFieldsAssignmentObjectTypeFragment | CoursePageFieldsCircleObjectTypeFragment | CoursePageFieldsCompetenceCertificateListObjectTypeFragment | CoursePageFieldsCompetenceCertificateObjectTypeFragment | CoursePageFieldsLearningContentAssignmentObjectTypeFragment | CoursePageFieldsLearningContentAttendanceCourseObjectTypeFragment | CoursePageFieldsLearningContentDocumentListObjectTypeFragment | CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment | CoursePageFieldsLearningContentFeedbackObjectTypeFragment | CoursePageFieldsLearningContentKnowledgeAssessmentObjectTypeFragment | CoursePageFieldsLearningContentLearningModuleObjectTypeFragment | CoursePageFieldsLearningContentMediaLibraryObjectTypeFragment | CoursePageFieldsLearningContentPlaceholderObjectTypeFragment | CoursePageFieldsLearningContentRichTextObjectTypeFragment | CoursePageFieldsLearningContentVideoObjectTypeFragment | CoursePageFieldsLearningPathObjectTypeFragment | CoursePageFieldsLearningSequenceObjectTypeFragment | CoursePageFieldsLearningUnitObjectTypeFragment | CoursePageFieldsPerformanceCriteriaObjectTypeFragment | CoursePageFieldsTopicObjectTypeFragment; +export type CoursePageFieldsFragment = CoursePageFieldsActionCompetenceObjectTypeFragment | CoursePageFieldsAssignmentObjectTypeFragment | CoursePageFieldsCircleObjectTypeFragment | CoursePageFieldsCompetenceCertificateListObjectTypeFragment | CoursePageFieldsCompetenceCertificateObjectTypeFragment | CoursePageFieldsLearningContentAssignmentObjectTypeFragment | CoursePageFieldsLearningContentAttendanceCourseObjectTypeFragment | CoursePageFieldsLearningContentDocumentListObjectTypeFragment | CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment | CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment | CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment | CoursePageFieldsLearningContentKnowledgeAssessmentObjectTypeFragment | CoursePageFieldsLearningContentLearningModuleObjectTypeFragment | CoursePageFieldsLearningContentMediaLibraryObjectTypeFragment | CoursePageFieldsLearningContentPlaceholderObjectTypeFragment | CoursePageFieldsLearningContentRichTextObjectTypeFragment | CoursePageFieldsLearningContentVideoObjectTypeFragment | CoursePageFieldsLearningPathObjectTypeFragment | CoursePageFieldsLearningSequenceObjectTypeFragment | CoursePageFieldsLearningUnitObjectTypeFragment | CoursePageFieldsPerformanceCriteriaObjectTypeFragment | CoursePageFieldsTopicObjectTypeFragment; export type AttendanceCheckQueryQueryVariables = Exact<{ courseSessionId: Scalars['ID']['input']; @@ -1113,8 +1133,11 @@ export type CompetenceCertificateQueryQuery = { __typename?: 'Query', competence { __typename?: 'LearningContentEdoniqTestObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null } & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment': CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment } } ) | ( - { __typename?: 'LearningContentFeedbackObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackObjectTypeFragment': CoursePageFieldsLearningContentFeedbackObjectTypeFragment } } + { __typename?: 'LearningContentFeedbackUKObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment': CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentFeedbackVVObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment': CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment } } ) | ( { __typename?: 'LearningContentKnowledgeAssessmentObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null } & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentKnowledgeAssessmentObjectTypeFragment': CoursePageFieldsLearningContentKnowledgeAssessmentObjectTypeFragment } } @@ -1186,8 +1209,11 @@ export type CourseQueryQuery = { __typename?: 'Query', course?: { __typename?: ' ) | null } & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment': CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment } } ) | ( - { __typename?: 'LearningContentFeedbackObjectType', can_user_self_toggle_course_completion: boolean, content_url: string, minutes?: number | null, description: string } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackObjectTypeFragment': CoursePageFieldsLearningContentFeedbackObjectTypeFragment } } + { __typename?: 'LearningContentFeedbackUKObjectType', can_user_self_toggle_course_completion: boolean, content_url: string, minutes?: number | null, description: string } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment': CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentFeedbackVVObjectType', can_user_self_toggle_course_completion: boolean, content_url: string, minutes?: number | null, description: string } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment': CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment } } ) | ( { __typename?: 'LearningContentKnowledgeAssessmentObjectType', can_user_self_toggle_course_completion: boolean, content_url: string, minutes?: number | null, description: string } & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentKnowledgeAssessmentObjectTypeFragment': CoursePageFieldsLearningContentKnowledgeAssessmentObjectTypeFragment } } diff --git a/client/src/gql/schema.graphql b/client/src/gql/schema.graphql index 56c4c08e..e6153773 100644 --- a/client/src/gql/schema.graphql +++ b/client/src/gql/schema.graphql @@ -9,7 +9,8 @@ type Query { learning_content_media_library: LearningContentMediaLibraryObjectType learning_content_assignment: LearningContentAssignmentObjectType learning_content_attendance_course: LearningContentAttendanceCourseObjectType - learning_content_feedback: LearningContentFeedbackObjectType + learning_content_feedback_uk: LearningContentFeedbackUKObjectType + learning_content_feedback_vv: LearningContentFeedbackVVObjectType learning_content_learning_module: LearningContentLearningModuleObjectType learning_content_knowledge_assessment: LearningContentKnowledgeAssessmentObjectType learning_content_placeholder: LearningContentPlaceholderObjectType @@ -708,7 +709,23 @@ type LearningContentMediaLibraryObjectType implements CoursePageInterface & Lear circle: CircleLightObjectType } -type LearningContentFeedbackObjectType implements CoursePageInterface & LearningContentInterface { +type LearningContentFeedbackUKObjectType implements CoursePageInterface & LearningContentInterface { + id: ID! + title: String! + slug: String! + content_type: String! + live: Boolean! + translation_key: String! + frontend_url: String! + course: CourseObjectType + minutes: Int + description: String! + content_url: String! + can_user_self_toggle_course_completion: Boolean! + circle: CircleLightObjectType +} + +type LearningContentFeedbackVVObjectType implements CoursePageInterface & LearningContentInterface { id: ID! title: String! slug: String! diff --git a/client/src/gql/typenames.ts b/client/src/gql/typenames.ts index 84bf9ca1..f640c0f9 100644 --- a/client/src/gql/typenames.ts +++ b/client/src/gql/typenames.ts @@ -54,7 +54,8 @@ export const LearningContentAssignmentObjectType = "LearningContentAssignmentObj export const LearningContentAttendanceCourseObjectType = "LearningContentAttendanceCourseObjectType"; export const LearningContentDocumentListObjectType = "LearningContentDocumentListObjectType"; export const LearningContentEdoniqTestObjectType = "LearningContentEdoniqTestObjectType"; -export const LearningContentFeedbackObjectType = "LearningContentFeedbackObjectType"; +export const LearningContentFeedbackUKObjectType = "LearningContentFeedbackUKObjectType"; +export const LearningContentFeedbackVVObjectType = "LearningContentFeedbackVVObjectType"; export const LearningContentInterface = "LearningContentInterface"; export const LearningContentKnowledgeAssessmentObjectType = "LearningContentKnowledgeAssessmentObjectType"; export const LearningContentLearningModuleObjectType = "LearningContentLearningModuleObjectType"; diff --git a/client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue b/client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue index 2362bb2c..4ee1add1 100644 --- a/client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue +++ b/client/src/pages/cockpit/cockpitPage/SubmissionsOverview.vue @@ -52,7 +52,8 @@ const submittables = computed(() => { const learningContents = circleFlatLearningContents(circle).filter( (lc) => lc.content_type === "learnpath.LearningContentAssignment" || - lc.content_type === "learnpath.LearningContentFeedback" || + lc.content_type === "learnpath.LearningContentFeedbackUK" || + lc.content_type === "learnpath.LearningContentFeedbackVV" || lc.content_type === "learnpath.LearningContentEdoniqTest" ); @@ -72,7 +73,10 @@ const submittables = computed(() => { }); const isFeedback = (lc: LearningContent) => { - return lc.content_type === "learnpath.LearningContentFeedback"; + return ( + lc.content_type === "learnpath.LearningContentFeedbackUK" || + lc.content_type === "learnpath.LearningContentFeedbackVV" + ); }; const isAssignment = (lc: LearningContent) => { diff --git a/client/src/pages/learningPath/learningContentPage/LearningContentParent.vue b/client/src/pages/learningPath/learningContentPage/LearningContentParent.vue index 8b5cd193..012f966f 100644 --- a/client/src/pages/learningPath/learningContentPage/LearningContentParent.vue +++ b/client/src/pages/learningPath/learningContentPage/LearningContentParent.vue @@ -14,12 +14,13 @@ import type { Component } from "vue"; import { computed, onUnmounted } from "vue"; import AssignmentBlock from "./blocks/AssignmentBlock.vue"; import AttendanceCourseBlock from "./blocks/AttendanceCourseBlock.vue"; -import FeedbackBlock from "./feedback/FeedbackBlock.vue"; import IframeBlock from "./blocks/IframeBlock.vue"; import MediaLibraryBlock from "./blocks/MediaLibraryBlock.vue"; import PlaceholderBlock from "./blocks/PlaceholderBlock.vue"; import RichTextBlock from "./blocks/RichTextBlock.vue"; import VideoBlock from "./blocks/VideoBlock.vue"; +import FeedbackBlockUK from "./feedback/FeedbackBlockUK.vue"; +import FeedbackBlockVV from "./feedback/FeedbackBlockVV.vue"; import { getPreviousRoute } from "@/router/history"; import { stringifyParse } from "@/utils/utils"; import { useCourseDataWithCompletion } from "@/composables"; @@ -42,7 +43,8 @@ const COMPONENTS: Record = { "learnpath.LearningContentAssignment": AssignmentBlock, "learnpath.LearningContentAttendanceCourse": AttendanceCourseBlock, "learnpath.LearningContentDocumentList": DocumentListBlock, - "learnpath.LearningContentFeedback": FeedbackBlock, + "learnpath.LearningContentFeedbackUK": FeedbackBlockUK, + "learnpath.LearningContentFeedbackVV": FeedbackBlockVV, "learnpath.LearningContentLearningModule": IframeBlock, "learnpath.LearningContentKnowledgeAssessment": IframeBlock, "learnpath.LearningContentMediaLibrary": MediaLibraryBlock, diff --git a/client/src/pages/learningPath/learningContentPage/feedback/FeedbackBlock.vue b/client/src/pages/learningPath/learningContentPage/feedback/FeedbackBlockUK.vue similarity index 100% rename from client/src/pages/learningPath/learningContentPage/feedback/FeedbackBlock.vue rename to client/src/pages/learningPath/learningContentPage/feedback/FeedbackBlockUK.vue diff --git a/client/src/pages/learningPath/learningContentPage/feedback/FeedbackBlockVV.vue b/client/src/pages/learningPath/learningContentPage/feedback/FeedbackBlockVV.vue new file mode 100644 index 00000000..c36838f9 --- /dev/null +++ b/client/src/pages/learningPath/learningContentPage/feedback/FeedbackBlockVV.vue @@ -0,0 +1,285 @@ + + + diff --git a/client/src/types.ts b/client/src/types.ts index fd22e391..df7f0b7a 100644 --- a/client/src/types.ts +++ b/client/src/types.ts @@ -11,7 +11,8 @@ import type { LearningContentAttendanceCourseObjectType, LearningContentDocumentListObjectType, LearningContentEdoniqTestObjectType, - LearningContentFeedbackObjectType, + LearningContentFeedbackUkObjectType, + LearningContentFeedbackVvObjectType, LearningContentKnowledgeAssessmentObjectType, LearningContentLearningModuleObjectType, LearningContentMediaLibraryObjectType, @@ -68,8 +69,12 @@ export type LearningContentEdoniqTest = LearningContentEdoniqTestObjectType & { readonly content_type: "learnpath.LearningContentEdoniqTest"; }; -export type LearningContentFeedback = LearningContentFeedbackObjectType & { - readonly content_type: "learnpath.LearningContentFeedback"; +export type LearningContentFeedbackVV = LearningContentFeedbackVvObjectType & { + readonly content_type: "learnpath.LearningContentFeedbackVV"; +}; + +export type LearningContentFeedbackUK = LearningContentFeedbackUkObjectType & { + readonly content_type: "learnpath.LearningContentFeedbackUK"; }; export type LearningContentLearningModule = LearningContentLearningModuleObjectType & { @@ -102,7 +107,8 @@ export type LearningContent = | LearningContentAttendanceCourse | LearningContentDocumentList | LearningContentEdoniqTest - | LearningContentFeedback + | LearningContentFeedbackUK + | LearningContentFeedbackVV | LearningContentLearningModule | LearningContentKnowledgeAssessment | LearningContentMediaLibrary diff --git a/client/src/utils/typeMaps.ts b/client/src/utils/typeMaps.ts index b0858fe7..618353fe 100644 --- a/client/src/utils/typeMaps.ts +++ b/client/src/utils/typeMaps.ts @@ -46,7 +46,8 @@ export function learningContentTypeData( return { title: t("learningContentTypes.test"), icon: "it-icon-lc-test" }; case "learnpath.LearningContentRichText": return { title: t("learningContentTypes.text"), icon: "it-icon-lc-resource" }; - case "learnpath.LearningContentFeedback": + case "learnpath.LearningContentFeedbackUK": + case "learnpath.LearningContentFeedbackVV": return { title: t("learningContentTypes.feedback"), icon: "it-icon-lc-feedback" }; case "learnpath.LearningContentPlaceholder": return { diff --git a/server/vbv_lernwelt/course/graphql/queries.py b/server/vbv_lernwelt/course/graphql/queries.py index cbe377e1..cc405a72 100644 --- a/server/vbv_lernwelt/course/graphql/queries.py +++ b/server/vbv_lernwelt/course/graphql/queries.py @@ -10,7 +10,8 @@ from vbv_lernwelt.learnpath.graphql.types import ( LearningContentAttendanceCourseObjectType, LearningContentDocumentListObjectType, LearningContentEdoniqTestObjectType, - LearningContentFeedbackObjectType, + LearningContentFeedbackUKObjectType, + LearningContentFeedbackVVObjectType, LearningContentKnowledgeAssessmentObjectType, LearningContentLearningModuleObjectType, LearningContentMediaLibraryObjectType, @@ -50,7 +51,8 @@ class CourseQuery(graphene.ObjectType): learning_content_attendance_course = graphene.Field( LearningContentAttendanceCourseObjectType ) - learning_content_feedback = graphene.Field(LearningContentFeedbackObjectType) + learning_content_feedback_uk = graphene.Field(LearningContentFeedbackUKObjectType) + learning_content_feedback_vv = graphene.Field(LearningContentFeedbackVVObjectType) learning_content_learning_module = graphene.Field( LearningContentLearningModuleObjectType ) diff --git a/server/vbv_lernwelt/learnpath/graphql/types.py b/server/vbv_lernwelt/learnpath/graphql/types.py index a1eb723a..f00f282f 100644 --- a/server/vbv_lernwelt/learnpath/graphql/types.py +++ b/server/vbv_lernwelt/learnpath/graphql/types.py @@ -11,6 +11,7 @@ from vbv_lernwelt.learnpath.models import ( LearningContentDocumentList, LearningContentEdoniqTest, LearningContentFeedback, + LearningContentFeedbackVV, LearningContentKnowledgeAssessment, LearningContentLearningModule, LearningContentMediaLibrary, @@ -50,7 +51,9 @@ class LearningContentInterface(CoursePageInterface): elif isinstance(instance, LearningContentAttendanceCourse): return LearningContentAttendanceCourseObjectType elif isinstance(instance, LearningContentFeedback): - return LearningContentFeedbackObjectType + return LearningContentFeedbackUKObjectType + elif isinstance(instance, LearningContentFeedbackVV): + return LearningContentFeedbackVVObjectType elif isinstance(instance, LearningContentLearningModule): return LearningContentLearningModuleObjectType elif isinstance(instance, LearningContentKnowledgeAssessment): @@ -105,7 +108,7 @@ class LearningContentPlaceholderObjectType(DjangoObjectType): fields = [] -class LearningContentFeedbackObjectType(DjangoObjectType): +class LearningContentFeedbackUKObjectType(DjangoObjectType): class Meta: model = LearningContentFeedback interfaces = ( @@ -115,6 +118,16 @@ class LearningContentFeedbackObjectType(DjangoObjectType): fields = [] +class LearningContentFeedbackVVObjectType(DjangoObjectType): + class Meta: + model = LearningContentFeedbackVV + interfaces = ( + CoursePageInterface, + LearningContentInterface, + ) + fields = [] + + class LearningContentLearningModuleObjectType(DjangoObjectType): class Meta: model = LearningContentLearningModule diff --git a/server/vbv_lernwelt/learnpath/migrations/0012_auto_20231129_0827.py b/server/vbv_lernwelt/learnpath/migrations/0012_auto_20231129_0827.py new file mode 100644 index 00000000..f66b15f0 --- /dev/null +++ b/server/vbv_lernwelt/learnpath/migrations/0012_auto_20231129_0827.py @@ -0,0 +1,87 @@ +# Generated by Django 3.2.20 on 2023-11-29 07:27 + +import django.db.models.deletion +import wagtail.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("wagtailcore", "0089_log_entry_data_json_null_to_object"), + ("learnpath", "0011_learningcontentknowledgeassessment"), + ] + + operations = [ + migrations.CreateModel( + name="LearningContentFeedbackUK", + fields=[ + ( + "page_ptr", + models.OneToOneField( + auto_created=True, + on_delete=django.db.models.deletion.CASCADE, + parent_link=True, + primary_key=True, + serialize=False, + to="wagtailcore.page", + ), + ), + ("minutes", models.PositiveIntegerField(default=15)), + ("description", wagtail.fields.RichTextField(blank=True)), + ("content_url", models.TextField(blank=True)), + ("has_course_completion_status", models.BooleanField(default=True)), + ( + "can_user_self_toggle_course_completion", + models.BooleanField(default=False), + ), + ], + options={ + "abstract": False, + }, + bases=("wagtailcore.page",), + ), + migrations.CreateModel( + name="LearningContentFeedbackVV", + fields=[ + ( + "page_ptr", + models.OneToOneField( + auto_created=True, + on_delete=django.db.models.deletion.CASCADE, + parent_link=True, + primary_key=True, + serialize=False, + to="wagtailcore.page", + ), + ), + ("minutes", models.PositiveIntegerField(default=15)), + ("description", wagtail.fields.RichTextField(blank=True)), + ("content_url", models.TextField(blank=True)), + ("has_course_completion_status", models.BooleanField(default=True)), + ( + "can_user_self_toggle_course_completion", + models.BooleanField(default=False), + ), + ], + options={ + "abstract": False, + }, + bases=("wagtailcore.page",), + ), + migrations.AlterField( + model_name="learningcontentassignment", + name="assignment_type", + field=models.CharField( + choices=[ + ("VOLUNTARY_CASEWORK", "VOLUNTARY_CASEWORK"), + ("MANDATORY_CASEWORK", "MANDATORY_CASEWORK"), + ("PREP_ASSIGNMENT", "PREP_ASSIGNMENT"), + ("REFLECTION", "REFLECTION"), + ("CONDITION_ACCEPTANCE", "CONDITION_ACCEPTANCE"), + ("EDONIQ_TEST", "EDONIQ_TEST"), + ], + default="MANDATORY_CASEWORK", + max_length=50, + ), + ), + ] diff --git a/server/vbv_lernwelt/learnpath/models.py b/server/vbv_lernwelt/learnpath/models.py index da56a8fc..77dc91a8 100644 --- a/server/vbv_lernwelt/learnpath/models.py +++ b/server/vbv_lernwelt/learnpath/models.py @@ -72,7 +72,8 @@ class Circle(CourseBasePage): "learnpath.LearningUnit", "learnpath.LearningContentAssignment", "learnpath.LearningContentAttendanceCourse", - "learnpath.LearningContentFeedback", + "learnpath.LearningContentFeedbackUK", + "learnpath.LearningContentFeedbackVV", "learnpath.LearningContentLearningModule", "learnpath.LearningContentKnowledgeAssessment", "learnpath.LearningContentMediaLibrary", @@ -324,6 +325,18 @@ class LearningContentFeedback(LearningContent): can_user_self_toggle_course_completion = models.BooleanField(default=False) +class LearningContentFeedbackUK(LearningContent): + parent_page_types = ["learnpath.Circle"] + subpage_types = [] + can_user_self_toggle_course_completion = models.BooleanField(default=False) + + +class LearningContentFeedbackVV(LearningContent): + parent_page_types = ["learnpath.Circle"] + subpage_types = [] + can_user_self_toggle_course_completion = models.BooleanField(default=False) + + class LearningContentLearningModule(LearningContent): parent_page_types = ["learnpath.Circle"] subpage_types = []