Add new learning content type
This commit is contained in:
parent
5850321776
commit
1d2aa38896
|
|
@ -662,6 +662,23 @@ export type LearningContentEdoniqTestObjectType = CoursePageInterface & Learning
|
||||||
translation_key: Scalars['String']['output'];
|
translation_key: Scalars['String']['output'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type LearningContentFeedbackAutomobilGewerbeObjectType = CoursePageInterface & LearningContentInterface & {
|
||||||
|
__typename?: 'LearningContentFeedbackAutomobilGewerbeObjectType';
|
||||||
|
can_user_self_toggle_course_completion: Scalars['Boolean']['output'];
|
||||||
|
circle?: Maybe<CircleLightObjectType>;
|
||||||
|
content_type: Scalars['String']['output'];
|
||||||
|
content_url: Scalars['String']['output'];
|
||||||
|
course?: Maybe<CourseObjectType>;
|
||||||
|
description: Scalars['String']['output'];
|
||||||
|
frontend_url: Scalars['String']['output'];
|
||||||
|
id: Scalars['ID']['output'];
|
||||||
|
live: Scalars['Boolean']['output'];
|
||||||
|
minutes?: Maybe<Scalars['Int']['output']>;
|
||||||
|
slug: Scalars['String']['output'];
|
||||||
|
title: Scalars['String']['output'];
|
||||||
|
translation_key: Scalars['String']['output'];
|
||||||
|
};
|
||||||
|
|
||||||
export type LearningContentFeedbackUkObjectType = CoursePageInterface & LearningContentInterface & {
|
export type LearningContentFeedbackUkObjectType = CoursePageInterface & LearningContentInterface & {
|
||||||
__typename?: 'LearningContentFeedbackUKObjectType';
|
__typename?: 'LearningContentFeedbackUKObjectType';
|
||||||
can_user_self_toggle_course_completion: Scalars['Boolean']['output'];
|
can_user_self_toggle_course_completion: Scalars['Boolean']['output'];
|
||||||
|
|
@ -973,6 +990,7 @@ export type Query = {
|
||||||
learning_content_assignment?: Maybe<LearningContentAssignmentObjectType>;
|
learning_content_assignment?: Maybe<LearningContentAssignmentObjectType>;
|
||||||
learning_content_attendance_course?: Maybe<LearningContentAttendanceCourseObjectType>;
|
learning_content_attendance_course?: Maybe<LearningContentAttendanceCourseObjectType>;
|
||||||
learning_content_document_list?: Maybe<LearningContentDocumentListObjectType>;
|
learning_content_document_list?: Maybe<LearningContentDocumentListObjectType>;
|
||||||
|
learning_content_feedback_automobil_gewerbe?: Maybe<LearningContentFeedbackAutomobilGewerbeObjectType>;
|
||||||
learning_content_feedback_uk?: Maybe<LearningContentFeedbackUkObjectType>;
|
learning_content_feedback_uk?: Maybe<LearningContentFeedbackUkObjectType>;
|
||||||
learning_content_feedback_vv?: Maybe<LearningContentFeedbackVvObjectType>;
|
learning_content_feedback_vv?: Maybe<LearningContentFeedbackVvObjectType>;
|
||||||
learning_content_knowledge_assessment?: Maybe<LearningContentKnowledgeAssessmentObjectType>;
|
learning_content_knowledge_assessment?: Maybe<LearningContentKnowledgeAssessmentObjectType>;
|
||||||
|
|
@ -1206,6 +1224,8 @@ type CoursePageFieldsLearningContentDocumentListObjectTypeFragment = { __typenam
|
||||||
|
|
||||||
type CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment = { __typename?: 'LearningContentEdoniqTestObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment' };
|
type CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment = { __typename?: 'LearningContentEdoniqTestObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment' };
|
||||||
|
|
||||||
|
type CoursePageFieldsLearningContentFeedbackAutomobilGewerbeObjectTypeFragment = { __typename?: 'LearningContentFeedbackAutomobilGewerbeObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsLearningContentFeedbackAutomobilGewerbeObjectTypeFragment' };
|
||||||
|
|
||||||
type CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment = { __typename?: 'LearningContentFeedbackUKObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment' };
|
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 CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment = { __typename?: 'LearningContentFeedbackVVObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment' };
|
||||||
|
|
@ -1232,7 +1252,7 @@ type CoursePageFieldsPerformanceCriteriaObjectTypeFragment = { __typename?: 'Per
|
||||||
|
|
||||||
type CoursePageFieldsTopicObjectTypeFragment = { __typename?: 'TopicObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsTopicObjectTypeFragment' };
|
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 | CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment | CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment | CoursePageFieldsLearningContentKnowledgeAssessmentObjectTypeFragment | CoursePageFieldsLearningContentLearningModuleObjectTypeFragment | CoursePageFieldsLearningContentMediaLibraryObjectTypeFragment | CoursePageFieldsLearningContentPlaceholderObjectTypeFragment | CoursePageFieldsLearningContentRichTextObjectTypeFragment | CoursePageFieldsLearningContentVideoObjectTypeFragment | CoursePageFieldsLearningPathObjectTypeFragment | CoursePageFieldsLearningSequenceObjectTypeFragment | CoursePageFieldsLearningUnitObjectTypeFragment | CoursePageFieldsPerformanceCriteriaObjectTypeFragment | CoursePageFieldsTopicObjectTypeFragment;
|
export type CoursePageFieldsFragment = CoursePageFieldsActionCompetenceObjectTypeFragment | CoursePageFieldsAssignmentObjectTypeFragment | CoursePageFieldsCircleObjectTypeFragment | CoursePageFieldsCompetenceCertificateListObjectTypeFragment | CoursePageFieldsCompetenceCertificateObjectTypeFragment | CoursePageFieldsLearningContentAssignmentObjectTypeFragment | CoursePageFieldsLearningContentAttendanceCourseObjectTypeFragment | CoursePageFieldsLearningContentDocumentListObjectTypeFragment | CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment | CoursePageFieldsLearningContentFeedbackAutomobilGewerbeObjectTypeFragment | CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment | CoursePageFieldsLearningContentFeedbackVvObjectTypeFragment | CoursePageFieldsLearningContentKnowledgeAssessmentObjectTypeFragment | CoursePageFieldsLearningContentLearningModuleObjectTypeFragment | CoursePageFieldsLearningContentMediaLibraryObjectTypeFragment | CoursePageFieldsLearningContentPlaceholderObjectTypeFragment | CoursePageFieldsLearningContentRichTextObjectTypeFragment | CoursePageFieldsLearningContentVideoObjectTypeFragment | CoursePageFieldsLearningPathObjectTypeFragment | CoursePageFieldsLearningSequenceObjectTypeFragment | CoursePageFieldsLearningUnitObjectTypeFragment | CoursePageFieldsPerformanceCriteriaObjectTypeFragment | CoursePageFieldsTopicObjectTypeFragment;
|
||||||
|
|
||||||
export type AttendanceCheckQueryQueryVariables = Exact<{
|
export type AttendanceCheckQueryQueryVariables = Exact<{
|
||||||
courseSessionId: Scalars['ID']['input'];
|
courseSessionId: Scalars['ID']['input'];
|
||||||
|
|
@ -1276,6 +1296,9 @@ export type CompetenceCertificateQueryQuery = { __typename?: 'Query', competence
|
||||||
) | (
|
) | (
|
||||||
{ __typename?: 'LearningContentEdoniqTestObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null }
|
{ __typename?: 'LearningContentEdoniqTestObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null }
|
||||||
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment': CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment } }
|
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment': CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment } }
|
||||||
|
) | (
|
||||||
|
{ __typename?: 'LearningContentFeedbackAutomobilGewerbeObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null }
|
||||||
|
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackAutomobilGewerbeObjectTypeFragment': CoursePageFieldsLearningContentFeedbackAutomobilGewerbeObjectTypeFragment } }
|
||||||
) | (
|
) | (
|
||||||
{ __typename?: 'LearningContentFeedbackUKObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null }
|
{ __typename?: 'LearningContentFeedbackUKObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null }
|
||||||
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment': CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment } }
|
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment': CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment } }
|
||||||
|
|
@ -1330,6 +1353,9 @@ export type CompetenceCertificateForUserQueryQuery = { __typename?: 'Query', com
|
||||||
) | (
|
) | (
|
||||||
{ __typename?: 'LearningContentEdoniqTestObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null }
|
{ __typename?: 'LearningContentEdoniqTestObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null }
|
||||||
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment': CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment } }
|
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment': CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment } }
|
||||||
|
) | (
|
||||||
|
{ __typename?: 'LearningContentFeedbackAutomobilGewerbeObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null }
|
||||||
|
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackAutomobilGewerbeObjectTypeFragment': CoursePageFieldsLearningContentFeedbackAutomobilGewerbeObjectTypeFragment } }
|
||||||
) | (
|
) | (
|
||||||
{ __typename?: 'LearningContentFeedbackUKObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null }
|
{ __typename?: 'LearningContentFeedbackUKObjectType', circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null }
|
||||||
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment': CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment } }
|
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment': CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment } }
|
||||||
|
|
@ -1407,6 +1433,9 @@ export type CourseQueryQuery = { __typename?: 'Query', course?: { __typename?: '
|
||||||
& { ' $fragmentRefs'?: { 'CoursePageFieldsCompetenceCertificateObjectTypeFragment': CoursePageFieldsCompetenceCertificateObjectTypeFragment } }
|
& { ' $fragmentRefs'?: { 'CoursePageFieldsCompetenceCertificateObjectTypeFragment': CoursePageFieldsCompetenceCertificateObjectTypeFragment } }
|
||||||
) | null }
|
) | null }
|
||||||
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment': CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment } }
|
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment': CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment } }
|
||||||
|
) | (
|
||||||
|
{ __typename?: 'LearningContentFeedbackAutomobilGewerbeObjectType', can_user_self_toggle_course_completion: boolean, content_url: string, minutes?: number | null, description: string }
|
||||||
|
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackAutomobilGewerbeObjectTypeFragment': CoursePageFieldsLearningContentFeedbackAutomobilGewerbeObjectTypeFragment } }
|
||||||
) | (
|
) | (
|
||||||
{ __typename?: 'LearningContentFeedbackUKObjectType', can_user_self_toggle_course_completion: boolean, content_url: string, minutes?: number | null, description: string }
|
{ __typename?: 'LearningContentFeedbackUKObjectType', can_user_self_toggle_course_completion: boolean, content_url: string, minutes?: number | null, description: string }
|
||||||
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment': CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment } }
|
& { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment': CoursePageFieldsLearningContentFeedbackUkObjectTypeFragment } }
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ type Query {
|
||||||
learning_content_attendance_course: LearningContentAttendanceCourseObjectType
|
learning_content_attendance_course: LearningContentAttendanceCourseObjectType
|
||||||
learning_content_feedback_uk: LearningContentFeedbackUKObjectType
|
learning_content_feedback_uk: LearningContentFeedbackUKObjectType
|
||||||
learning_content_feedback_vv: LearningContentFeedbackVVObjectType
|
learning_content_feedback_vv: LearningContentFeedbackVVObjectType
|
||||||
|
learning_content_feedback_automobil_gewerbe: LearningContentFeedbackAutomobilGewerbeObjectType
|
||||||
learning_content_learning_module: LearningContentLearningModuleObjectType
|
learning_content_learning_module: LearningContentLearningModuleObjectType
|
||||||
learning_content_knowledge_assessment: LearningContentKnowledgeAssessmentObjectType
|
learning_content_knowledge_assessment: LearningContentKnowledgeAssessmentObjectType
|
||||||
learning_content_placeholder: LearningContentPlaceholderObjectType
|
learning_content_placeholder: LearningContentPlaceholderObjectType
|
||||||
|
|
@ -819,6 +820,22 @@ type LearningContentFeedbackVVObjectType implements CoursePageInterface & Learni
|
||||||
circle: CircleLightObjectType
|
circle: CircleLightObjectType
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LearningContentFeedbackAutomobilGewerbeObjectType 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 LearningContentLearningModuleObjectType implements CoursePageInterface & LearningContentInterface {
|
type LearningContentLearningModuleObjectType implements CoursePageInterface & LearningContentInterface {
|
||||||
id: ID!
|
id: ID!
|
||||||
title: String!
|
title: String!
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ export const LearningContentAssignmentObjectType = "LearningContentAssignmentObj
|
||||||
export const LearningContentAttendanceCourseObjectType = "LearningContentAttendanceCourseObjectType";
|
export const LearningContentAttendanceCourseObjectType = "LearningContentAttendanceCourseObjectType";
|
||||||
export const LearningContentDocumentListObjectType = "LearningContentDocumentListObjectType";
|
export const LearningContentDocumentListObjectType = "LearningContentDocumentListObjectType";
|
||||||
export const LearningContentEdoniqTestObjectType = "LearningContentEdoniqTestObjectType";
|
export const LearningContentEdoniqTestObjectType = "LearningContentEdoniqTestObjectType";
|
||||||
|
export const LearningContentFeedbackAutomobilGewerbeObjectType = "LearningContentFeedbackAutomobilGewerbeObjectType";
|
||||||
export const LearningContentFeedbackUKObjectType = "LearningContentFeedbackUKObjectType";
|
export const LearningContentFeedbackUKObjectType = "LearningContentFeedbackUKObjectType";
|
||||||
export const LearningContentFeedbackVVObjectType = "LearningContentFeedbackVVObjectType";
|
export const LearningContentFeedbackVVObjectType = "LearningContentFeedbackVVObjectType";
|
||||||
export const LearningContentInterface = "LearningContentInterface";
|
export const LearningContentInterface = "LearningContentInterface";
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import MediaLibraryBlock from "./blocks/MediaLibraryBlock.vue";
|
||||||
import PlaceholderBlock from "./blocks/PlaceholderBlock.vue";
|
import PlaceholderBlock from "./blocks/PlaceholderBlock.vue";
|
||||||
import RichTextBlock from "./blocks/RichTextBlock.vue";
|
import RichTextBlock from "./blocks/RichTextBlock.vue";
|
||||||
import VideoBlock from "./blocks/VideoBlock.vue";
|
import VideoBlock from "./blocks/VideoBlock.vue";
|
||||||
|
import FeedbackBlockAutomobilGewerbe from "./feedback/FeedbackBlockAutomobilGewerbe.vue";
|
||||||
import FeedbackBlockUK from "./feedback/FeedbackBlockUK.vue";
|
import FeedbackBlockUK from "./feedback/FeedbackBlockUK.vue";
|
||||||
import FeedbackBlockVV from "./feedback/FeedbackBlockVV.vue";
|
import FeedbackBlockVV from "./feedback/FeedbackBlockVV.vue";
|
||||||
|
|
||||||
|
|
@ -45,6 +46,7 @@ const COMPONENTS: Record<LearningContentContentType, Component> = {
|
||||||
"learnpath.LearningContentDocumentList": DocumentListBlock,
|
"learnpath.LearningContentDocumentList": DocumentListBlock,
|
||||||
"learnpath.LearningContentFeedbackUK": FeedbackBlockUK,
|
"learnpath.LearningContentFeedbackUK": FeedbackBlockUK,
|
||||||
"learnpath.LearningContentFeedbackVV": FeedbackBlockVV,
|
"learnpath.LearningContentFeedbackVV": FeedbackBlockVV,
|
||||||
|
"learnpath.LearningContentFeedbackAutomobilGewerbe": FeedbackBlockAutomobilGewerbe,
|
||||||
"learnpath.LearningContentLearningModule": IframeBlock,
|
"learnpath.LearningContentLearningModule": IframeBlock,
|
||||||
"learnpath.LearningContentKnowledgeAssessment": IframeBlock,
|
"learnpath.LearningContentKnowledgeAssessment": IframeBlock,
|
||||||
"learnpath.LearningContentMediaLibrary": MediaLibraryBlock,
|
"learnpath.LearningContentMediaLibrary": MediaLibraryBlock,
|
||||||
|
|
@ -58,6 +60,7 @@ const DEFAULT_BLOCK = PlaceholderBlock;
|
||||||
const component = computed(() => {
|
const component = computed(() => {
|
||||||
return COMPONENTS[props.learningContent.content_type] || DEFAULT_BLOCK;
|
return COMPONENTS[props.learningContent.content_type] || DEFAULT_BLOCK;
|
||||||
});
|
});
|
||||||
|
console.log("component", component);
|
||||||
|
|
||||||
function handleFinishedLearningContent() {
|
function handleFinishedLearningContent() {
|
||||||
circleStore.continueFromLearningContent(
|
circleStore.continueFromLearningContent(
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,14 @@ import { graphql } from "@/gql";
|
||||||
import FeedbackCompletition from "@/pages/learningPath/learningContentPage/feedback/FeedbackCompletition.vue";
|
import FeedbackCompletition from "@/pages/learningPath/learningContentPage/feedback/FeedbackCompletition.vue";
|
||||||
import LearningContentMultiLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue";
|
import LearningContentMultiLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue";
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
import type { LearningContentFeedbackUK, LearningContentFeedbackVV } from "@/types";
|
import type { LearningContentFeedback } from "@/types";
|
||||||
import { useMutation } from "@urql/vue";
|
import { useMutation } from "@urql/vue";
|
||||||
import { useRouteQuery } from "@vueuse/router";
|
import { useRouteQuery } from "@vueuse/router";
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import { computed, onMounted, reactive, ref } from "vue";
|
import { computed, onMounted, reactive, ref } from "vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
content: LearningContentFeedbackVV | LearningContentFeedbackUK;
|
content: LearningContentFeedback;
|
||||||
stepLabels: string[];
|
stepLabels: string[];
|
||||||
questionData: any[];
|
questionData: any[];
|
||||||
introduction: string;
|
introduction: string;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import ItRadioGroup from "@/components/ui/ItRadioGroup.vue";
|
||||||
|
import ItTextarea from "@/components/ui/ItTextarea.vue";
|
||||||
|
import {
|
||||||
|
PERCENTAGES,
|
||||||
|
RATINGS,
|
||||||
|
YES_NO,
|
||||||
|
} from "@/pages/learningPath/learningContentPage/feedback/feedback.constants";
|
||||||
|
import FeedbackBase from "@/pages/learningPath/learningContentPage/feedback/FeedbackBase.vue";
|
||||||
|
import type { LearningContentFeedback } from "@/types";
|
||||||
|
import { useTranslation } from "i18next-vue";
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
content: LearningContentFeedback;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const stepLabels = [
|
||||||
|
t("general.introduction"),
|
||||||
|
t("feedback.satisfactionLabel"),
|
||||||
|
t("feedback.goalAttainmentLabel"),
|
||||||
|
t("feedback.proficiencyLabelVV"),
|
||||||
|
t("feedback.recommendLabelVV"),
|
||||||
|
t("feedback.coursePositiveFeedbackLabel"),
|
||||||
|
t("feedback.courseNegativeFeedbackLabel"),
|
||||||
|
t("general.submission"),
|
||||||
|
];
|
||||||
|
|
||||||
|
const questionData = [
|
||||||
|
{
|
||||||
|
modelKey: "satisfaction",
|
||||||
|
items: RATINGS,
|
||||||
|
component: ItRadioGroup,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
modelKey: "goal_attainment",
|
||||||
|
items: RATINGS,
|
||||||
|
component: ItRadioGroup,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
modelKey: "proficiency",
|
||||||
|
items: PERCENTAGES,
|
||||||
|
component: ItRadioGroup,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
modelKey: "would_recommend",
|
||||||
|
items: YES_NO,
|
||||||
|
component: ItRadioGroup,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
modelKey: "course_positive_feedback",
|
||||||
|
component: ItTextarea,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
modelKey: "course_negative_feedback",
|
||||||
|
component: ItTextarea,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<FeedbackBase
|
||||||
|
:step-labels="stepLabels"
|
||||||
|
:question-data="questionData"
|
||||||
|
:content="props.content"
|
||||||
|
:introduction="$t('a.feedback.introductionVV')"
|
||||||
|
:title="$t('Feedback')"
|
||||||
|
:completion-title="$t('feedback.sendFeedback')"
|
||||||
|
:completion-description="$t('feedback.completionDescriptionVV')"
|
||||||
|
:show-avatar="false"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
@ -8,12 +8,12 @@ import {
|
||||||
YES_NO,
|
YES_NO,
|
||||||
} from "@/pages/learningPath/learningContentPage/feedback/feedback.constants";
|
} from "@/pages/learningPath/learningContentPage/feedback/feedback.constants";
|
||||||
import FeedbackBase from "@/pages/learningPath/learningContentPage/feedback/FeedbackBase.vue";
|
import FeedbackBase from "@/pages/learningPath/learningContentPage/feedback/FeedbackBase.vue";
|
||||||
import type { LearningContentFeedbackUK, LearningContentFeedbackVV } from "@/types";
|
import type { LearningContentFeedback } from "@/types";
|
||||||
import { useTranslation } from "i18next-vue";
|
import { useTranslation } from "i18next-vue";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
content: LearningContentFeedbackVV | LearningContentFeedbackUK;
|
content: LearningContentFeedback;
|
||||||
}>();
|
}>();
|
||||||
const courseSessionDetailResult = useCourseSessionDetailQuery();
|
const courseSessionDetailResult = useCourseSessionDetailQuery();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@ import {
|
||||||
YES_NO,
|
YES_NO,
|
||||||
} from "@/pages/learningPath/learningContentPage/feedback/feedback.constants";
|
} from "@/pages/learningPath/learningContentPage/feedback/feedback.constants";
|
||||||
import FeedbackBase from "@/pages/learningPath/learningContentPage/feedback/FeedbackBase.vue";
|
import FeedbackBase from "@/pages/learningPath/learningContentPage/feedback/FeedbackBase.vue";
|
||||||
import type { LearningContentFeedbackUK, LearningContentFeedbackVV } from "@/types";
|
import type { LearningContentFeedback } from "@/types";
|
||||||
import { useTranslation } from "i18next-vue";
|
import { useTranslation } from "i18next-vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
content: LearningContentFeedbackVV | LearningContentFeedbackUK;
|
content: LearningContentFeedback;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import type {
|
||||||
LearningContentAttendanceCourseObjectType,
|
LearningContentAttendanceCourseObjectType,
|
||||||
LearningContentDocumentListObjectType,
|
LearningContentDocumentListObjectType,
|
||||||
LearningContentEdoniqTestObjectType,
|
LearningContentEdoniqTestObjectType,
|
||||||
|
LearningContentFeedbackAutomobilGewerbeObjectType,
|
||||||
LearningContentFeedbackUkObjectType,
|
LearningContentFeedbackUkObjectType,
|
||||||
LearningContentFeedbackVvObjectType,
|
LearningContentFeedbackVvObjectType,
|
||||||
LearningContentKnowledgeAssessmentObjectType,
|
LearningContentKnowledgeAssessmentObjectType,
|
||||||
|
|
@ -77,6 +78,11 @@ export type LearningContentFeedbackUK = LearningContentFeedbackUkObjectType & {
|
||||||
readonly content_type: "learnpath.LearningContentFeedbackUK";
|
readonly content_type: "learnpath.LearningContentFeedbackUK";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type LearningContentFeedbackAutomobilGewerbe =
|
||||||
|
LearningContentFeedbackAutomobilGewerbeObjectType & {
|
||||||
|
readonly content_type: "learnpath.LearningContentFeedbackAutomobilGewerbe";
|
||||||
|
};
|
||||||
|
|
||||||
export type LearningContentLearningModule = LearningContentLearningModuleObjectType & {
|
export type LearningContentLearningModule = LearningContentLearningModuleObjectType & {
|
||||||
readonly content_type: "learnpath.LearningContentLearningModule";
|
readonly content_type: "learnpath.LearningContentLearningModule";
|
||||||
};
|
};
|
||||||
|
|
@ -109,6 +115,7 @@ export type LearningContent =
|
||||||
| LearningContentEdoniqTest
|
| LearningContentEdoniqTest
|
||||||
| LearningContentFeedbackUK
|
| LearningContentFeedbackUK
|
||||||
| LearningContentFeedbackVV
|
| LearningContentFeedbackVV
|
||||||
|
| LearningContentFeedbackAutomobilGewerbe
|
||||||
| LearningContentLearningModule
|
| LearningContentLearningModule
|
||||||
| LearningContentKnowledgeAssessment
|
| LearningContentKnowledgeAssessment
|
||||||
| LearningContentMediaLibrary
|
| LearningContentMediaLibrary
|
||||||
|
|
@ -116,6 +123,11 @@ export type LearningContent =
|
||||||
| LearningContentRichText
|
| LearningContentRichText
|
||||||
| LearningContentVideo;
|
| LearningContentVideo;
|
||||||
|
|
||||||
|
export type LearningContentFeedback =
|
||||||
|
| LearningContentFeedbackUK
|
||||||
|
| LearningContentFeedbackVV
|
||||||
|
| LearningContentFeedbackAutomobilGewerbe;
|
||||||
|
|
||||||
export type LearningContentWithCompletion = LearningContent &
|
export type LearningContentWithCompletion = LearningContent &
|
||||||
Completable & {
|
Completable & {
|
||||||
continueUrl?: string;
|
continueUrl?: string;
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ export function learningContentTypeData(
|
||||||
return { title: t("learningContentTypes.text"), icon: "it-icon-lc-resource" };
|
return { title: t("learningContentTypes.text"), icon: "it-icon-lc-resource" };
|
||||||
case "learnpath.LearningContentFeedbackUK":
|
case "learnpath.LearningContentFeedbackUK":
|
||||||
case "learnpath.LearningContentFeedbackVV":
|
case "learnpath.LearningContentFeedbackVV":
|
||||||
|
case "learnpath.LearningContentFeedbackAutomobilGewerbe":
|
||||||
return { title: t("learningContentTypes.feedback"), icon: "it-icon-lc-feedback" };
|
return { title: t("learningContentTypes.feedback"), icon: "it-icon-lc-feedback" };
|
||||||
case "learnpath.LearningContentPlaceholder":
|
case "learnpath.LearningContentPlaceholder":
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import graphene
|
import graphene
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from graphql import GraphQLError
|
from graphql import GraphQLError
|
||||||
|
|
||||||
from vbv_lernwelt.course.graphql.types import CourseObjectType, CourseSessionObjectType
|
from vbv_lernwelt.course.graphql.types import CourseObjectType, CourseSessionObjectType
|
||||||
from vbv_lernwelt.course.models import Course, CourseSession
|
from vbv_lernwelt.course.models import Course, CourseSession
|
||||||
from vbv_lernwelt.iam.permissions import has_course_access
|
from vbv_lernwelt.iam.permissions import has_course_access
|
||||||
|
|
@ -10,6 +9,7 @@ from vbv_lernwelt.learnpath.graphql.types import (
|
||||||
LearningContentAttendanceCourseObjectType,
|
LearningContentAttendanceCourseObjectType,
|
||||||
LearningContentDocumentListObjectType,
|
LearningContentDocumentListObjectType,
|
||||||
LearningContentEdoniqTestObjectType,
|
LearningContentEdoniqTestObjectType,
|
||||||
|
LearningContentFeedbackAutomobilGewerbeObjectType,
|
||||||
LearningContentFeedbackUKObjectType,
|
LearningContentFeedbackUKObjectType,
|
||||||
LearningContentFeedbackVVObjectType,
|
LearningContentFeedbackVVObjectType,
|
||||||
LearningContentKnowledgeAssessmentObjectType,
|
LearningContentKnowledgeAssessmentObjectType,
|
||||||
|
|
@ -53,6 +53,7 @@ class CourseQuery(graphene.ObjectType):
|
||||||
)
|
)
|
||||||
learning_content_feedback_uk = graphene.Field(LearningContentFeedbackUKObjectType)
|
learning_content_feedback_uk = graphene.Field(LearningContentFeedbackUKObjectType)
|
||||||
learning_content_feedback_vv = graphene.Field(LearningContentFeedbackVVObjectType)
|
learning_content_feedback_vv = graphene.Field(LearningContentFeedbackVVObjectType)
|
||||||
|
learning_content_feedback_automobil_gewerbe = graphene.Field(LearningContentFeedbackAutomobilGewerbeObjectType)
|
||||||
learning_content_learning_module = graphene.Field(
|
learning_content_learning_module = graphene.Field(
|
||||||
LearningContentLearningModuleObjectType
|
LearningContentLearningModuleObjectType
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import graphene
|
import graphene
|
||||||
import structlog
|
import structlog
|
||||||
from graphene_django import DjangoObjectType
|
from graphene_django import DjangoObjectType
|
||||||
|
|
||||||
from vbv_lernwelt.core.utils import find_first_index
|
from vbv_lernwelt.core.utils import find_first_index
|
||||||
from vbv_lernwelt.course.graphql.interfaces import CoursePageInterface
|
from vbv_lernwelt.course.graphql.interfaces import CoursePageInterface
|
||||||
from vbv_lernwelt.learnpath.models import (
|
from vbv_lernwelt.learnpath.models import (
|
||||||
|
|
@ -10,6 +9,7 @@ from vbv_lernwelt.learnpath.models import (
|
||||||
LearningContentAttendanceCourse,
|
LearningContentAttendanceCourse,
|
||||||
LearningContentDocumentList,
|
LearningContentDocumentList,
|
||||||
LearningContentEdoniqTest,
|
LearningContentEdoniqTest,
|
||||||
|
LearningContentFeedbackAutomobilGewerbe,
|
||||||
LearningContentFeedbackUK,
|
LearningContentFeedbackUK,
|
||||||
LearningContentFeedbackVV,
|
LearningContentFeedbackVV,
|
||||||
LearningContentKnowledgeAssessment,
|
LearningContentKnowledgeAssessment,
|
||||||
|
|
@ -54,6 +54,8 @@ class LearningContentInterface(CoursePageInterface):
|
||||||
return LearningContentFeedbackUKObjectType
|
return LearningContentFeedbackUKObjectType
|
||||||
elif isinstance(instance, LearningContentFeedbackVV):
|
elif isinstance(instance, LearningContentFeedbackVV):
|
||||||
return LearningContentFeedbackVVObjectType
|
return LearningContentFeedbackVVObjectType
|
||||||
|
elif isinstance(instance, LearningContentFeedbackAutomobilGewerbe):
|
||||||
|
return LearningContentFeedbackAutomobilGewerbeObjectType
|
||||||
elif isinstance(instance, LearningContentLearningModule):
|
elif isinstance(instance, LearningContentLearningModule):
|
||||||
return LearningContentLearningModuleObjectType
|
return LearningContentLearningModuleObjectType
|
||||||
elif isinstance(instance, LearningContentKnowledgeAssessment):
|
elif isinstance(instance, LearningContentKnowledgeAssessment):
|
||||||
|
|
@ -128,6 +130,16 @@ class LearningContentFeedbackVVObjectType(DjangoObjectType):
|
||||||
fields = []
|
fields = []
|
||||||
|
|
||||||
|
|
||||||
|
class LearningContentFeedbackAutomobilGewerbeObjectType(DjangoObjectType):
|
||||||
|
class Meta:
|
||||||
|
model = LearningContentFeedbackAutomobilGewerbe
|
||||||
|
interfaces = (
|
||||||
|
CoursePageInterface,
|
||||||
|
LearningContentInterface,
|
||||||
|
)
|
||||||
|
fields = []
|
||||||
|
|
||||||
|
|
||||||
class LearningContentLearningModuleObjectType(DjangoObjectType):
|
class LearningContentLearningModuleObjectType(DjangoObjectType):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = LearningContentLearningModule
|
model = LearningContentLearningModule
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-10-28 09:59
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
import wagtail.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("wagtailcore", "0089_log_entry_data_json_null_to_object"),
|
||||||
|
("learnpath", "0020_auto_20240730_0905"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name="LearningContentFeedbackAutomobilGewerbe",
|
||||||
|
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",),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -95,6 +95,7 @@ class Circle(CourseBasePage):
|
||||||
"learnpath.LearningContentAttendanceCourse",
|
"learnpath.LearningContentAttendanceCourse",
|
||||||
"learnpath.LearningContentFeedbackUK",
|
"learnpath.LearningContentFeedbackUK",
|
||||||
"learnpath.LearningContentFeedbackVV",
|
"learnpath.LearningContentFeedbackVV",
|
||||||
|
"learnpath.LearningContentFeedbackAutomobilGewerbe",
|
||||||
"learnpath.LearningContentLearningModule",
|
"learnpath.LearningContentLearningModule",
|
||||||
"learnpath.LearningContentKnowledgeAssessment",
|
"learnpath.LearningContentKnowledgeAssessment",
|
||||||
"learnpath.LearningContentMediaLibrary",
|
"learnpath.LearningContentMediaLibrary",
|
||||||
|
|
@ -373,6 +374,12 @@ class LearningContentFeedbackVV(LearningContent):
|
||||||
can_user_self_toggle_course_completion = models.BooleanField(default=False)
|
can_user_self_toggle_course_completion = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
|
||||||
|
class LearningContentFeedbackAutomobilGewerbe(LearningContent):
|
||||||
|
parent_page_types = ["learnpath.Circle"]
|
||||||
|
subpage_types = []
|
||||||
|
can_user_self_toggle_course_completion = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
|
||||||
class LearningContentLearningModule(LearningContent):
|
class LearningContentLearningModule(LearningContent):
|
||||||
parent_page_types = ["learnpath.Circle"]
|
parent_page_types = ["learnpath.Circle"]
|
||||||
subpage_types = []
|
subpage_types = []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue