diff --git a/client/src/composables.ts b/client/src/composables.ts index 4c042785..3d7be049 100644 --- a/client/src/composables.ts +++ b/client/src/composables.ts @@ -1,10 +1,11 @@ import { graphqlClient } from "@/graphql/client"; -import { COURSE_SESSION_DETAIL_QUERY, LEARNING_PATH_QUERY } from "@/graphql/queries"; +import { COURSE_QUERY, COURSE_SESSION_DETAIL_QUERY } from "@/graphql/queries"; import { circleFlatChildren, circleFlatLearningContents } from "@/services/circle"; import { useCompletionStore } from "@/stores/completion"; import { useCourseSessionsStore } from "@/stores/courseSessions"; import { useUserStore } from "@/stores/user"; import type { + ActionCompetence, CourseCompletion, CourseCompletionStatus, CourseSession, @@ -12,6 +13,7 @@ import type { LearningContentWithCompletion, LearningPathType, LearningUnitPerformanceCriteria, + PerformanceCriteria, } from "@/types"; import { useQuery } from "@urql/vue"; import log from "loglevel"; @@ -140,14 +142,18 @@ export function flatCircles(learningPath: LearningPathType) { export function useLearningPath(courseSlug: string) { const learningPath = ref(undefined); + const actionCompetences = ref([]); // urql.useQuery is not meant to be used programmatically, so we use graphqlClient.query instead const resultPromise = graphqlClient - .query(LEARNING_PATH_QUERY, { slug: `${courseSlug}-lp` }) + .query(COURSE_QUERY, { slug: `${courseSlug}` }) .toPromise(); resultPromise.then((result) => { - learningPath.value = result.data?.learning_path as LearningPathType; + actionCompetences.value = result.data?.course + ?.action_competences as ActionCompetence[]; + learningPath.value = result.data?.course?.learning_path as LearningPathType; + // attach circle information to learning contents if (learningPath.value) { flatCircles(learningPath.value).forEach((circle) => { @@ -157,6 +163,17 @@ export function useLearningPath(courseSlug: string) { slug: circle.slug, title: circle.title, }; + + if (lc.content_type === "competence.PerformanceCriteria") { + const pc = findPerformanceCriterion(lc.id); + if (pc) { + pc.circle = { + id: circle.id, + slug: circle.slug, + title: circle.title, + }; + } + } }); }); } @@ -175,6 +192,16 @@ export function useLearningPath(courseSlug: string) { }); } + function findPerformanceCriterion(id: string) { + return (actionCompetences.value ?? []) + .flatMap((ac) => { + return ac.performance_criteria; + }) + .find((pc) => { + return pc.id === id; + }) as PerformanceCriteria | undefined; + } + function findLearningContent(learningContentId: string) { return (circles.value ?? []) .flatMap((c) => { @@ -185,7 +212,21 @@ export function useLearningPath(courseSlug: string) { }); } - return { resultPromise, learningPath, circles, findCircle, findLearningContent }; + const flatPerformanceCriteria = computed(() => { + return (actionCompetences.value ?? []).flatMap((ac) => { + return ac.performance_criteria; + }) as PerformanceCriteria[]; + }); + + return { + resultPromise, + learningPath, + actionCompetences, + circles, + findCircle, + findLearningContent, + flatPerformanceCriteria, + }; } export function useLearningPathWithCompletion( @@ -203,9 +244,10 @@ export function useLearningPathWithCompletion( courseSessionId = useCurrentCourseSession().value.id; } - const learningPathResult = useLearningPath(courseSlug); + const courseResult = useLearningPath(courseSlug); const completionStore = useCompletionStore(); const nextLearningContent = ref(null); + const loaded = ref(false); function updateCompletionData() { if (userId && courseSessionId) { @@ -215,8 +257,8 @@ export function useLearningPathWithCompletion( } function _parseCompletionData(completionData: CourseCompletion[]) { - if (learningPathResult.circles.value) { - learningPathResult.circles.value.forEach((circle) => { + if (courseResult.circles.value) { + courseResult.circles.value.forEach((circle) => { circleFlatChildren(circle).forEach((lc) => { const pageIndex = completionData.findIndex((e) => { return e.page_id === lc.id; @@ -230,10 +272,25 @@ export function useLearningPathWithCompletion( }); } + if (courseResult.actionCompetences.value) { + courseResult.actionCompetences.value.forEach((ac) => { + ac.performance_criteria.forEach((pc) => { + const pageIndex = completionData.findIndex((e) => { + return e.page_id === pc.id; + }); + if (pageIndex >= 0) { + pc.completion_status = completionData[pageIndex].completion_status; + } else { + pc.completion_status = "UNKNOWN"; + } + }); + }); + } + // FIXME calculate nextLearningContent - if (learningPathResult.circles.value?.length) { + if (courseResult.circles.value?.length) { nextLearningContent.value = circleFlatLearningContents( - learningPathResult.circles.value[0] + courseResult.circles.value[0] )[0]; } } @@ -254,10 +311,11 @@ export function useLearningPathWithCompletion( } async function _start() { - Promise.all([learningPathResult.resultPromise, updateCompletionData()]).then( + Promise.all([courseResult.resultPromise, updateCompletionData()]).then( // eslint-disable-next-line @typescript-eslint/no-unused-vars ([_queryResults, completionData]) => { _parseCompletionData(completionData); + loaded.value = true; } ); } @@ -265,7 +323,8 @@ export function useLearningPathWithCompletion( _start(); return { - ...learningPathResult, + ...courseResult, + loaded, updateCompletionData, markCompletion, nextLearningContent, diff --git a/client/src/gql/gql.ts b/client/src/gql/gql.ts index 3ea7bf4f..8d67b42f 100644 --- a/client/src/gql/gql.ts +++ b/client/src/gql/gql.ts @@ -20,7 +20,7 @@ const documents = { "\n query assignmentCompletionQuery(\n $assignmentId: ID!\n $courseSessionId: ID!\n $learningContentId: ID\n $assignmentUserId: UUID\n ) {\n assignment(id: $assignmentId) {\n assignment_type\n needs_expert_evaluation\n max_points\n content_type\n effort_required\n evaluation_description\n evaluation_document_url\n evaluation_tasks\n id\n intro_text\n performance_objectives\n slug\n tasks\n title\n translation_key\n competence_certificate {\n ...CoursePageFields\n }\n }\n assignment_completion(\n assignment_id: $assignmentId\n course_session_id: $courseSessionId\n assignment_user_id: $assignmentUserId\n learning_content_page_id: $learningContentId\n ) {\n id\n completion_status\n submitted_at\n evaluation_submitted_at\n evaluation_user {\n id\n }\n assignment_user {\n id\n }\n evaluation_points\n evaluation_max_points\n evaluation_passed\n edoniq_extended_time_flag\n completion_data\n task_completion_data\n }\n }\n": types.AssignmentCompletionQueryDocument, "\n query competenceCertificateQuery($courseSlug: String!, $courseSessionId: ID!) {\n competence_certificate_list(course_slug: $courseSlug) {\n ...CoursePageFields\n competence_certificates {\n ...CoursePageFields\n assignments {\n ...CoursePageFields\n assignment_type\n max_points\n completion(course_session_id: $courseSessionId) {\n id\n completion_status\n submitted_at\n evaluation_points\n evaluation_max_points\n evaluation_passed\n }\n learning_content {\n ...CoursePageFields\n circle {\n id\n title\n slug\n }\n }\n }\n }\n }\n }\n": types.CompetenceCertificateQueryDocument, "\n query courseSessionDetail($courseSessionId: ID!) {\n course_session(id: $courseSessionId) {\n id\n title\n course {\n id\n title\n slug\n }\n users {\n id\n user_id\n first_name\n last_name\n email\n avatar_url\n role\n circles {\n id\n title\n slug\n }\n }\n attendance_courses {\n id\n location\n trainer\n due_date {\n id\n start\n end\n }\n learning_content_id\n learning_content {\n id\n title\n circle {\n id\n title\n slug\n }\n }\n }\n assignments {\n id\n submission_deadline {\n id\n start\n }\n evaluation_deadline {\n id\n start\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n edoniq_tests {\n id\n deadline {\n id\n start\n end\n }\n learning_content {\n id\n title\n content_assignment {\n id\n title\n assignment_type\n }\n }\n }\n }\n }\n": types.CourseSessionDetailDocument, - "\n query learningPathQuery($slug: String!) {\n learning_path(slug: $slug) {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n competence_certificate {\n ...CoursePageFields\n }\n }\n }\n }\n }\n }\n }\n }\n }\n": types.LearningPathQueryDocument, + "\n query courseQuery($slug: String!) {\n course(slug: $slug) {\n id\n slug\n category_name\n action_competences {\n competence_id\n ...CoursePageFields\n performance_criteria {\n competence_id\n learning_unit {\n id\n slug\n evaluate_url\n }\n ...CoursePageFields\n }\n }\n learning_path {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n competence_certificate {\n ...CoursePageFields\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n": types.CourseQueryDocument, "\n mutation SendFeedbackMutation(\n $courseSessionId: ID!\n $learningContentId: ID!\n $data: GenericScalar!\n $submitted: Boolean\n ) {\n send_feedback(\n course_session_id: $courseSessionId\n learning_content_page_id: $learningContentId\n data: $data\n submitted: $submitted\n ) {\n feedback_response {\n id\n data\n submitted\n }\n errors {\n field\n messages\n }\n }\n }\n": types.SendFeedbackMutationDocument, }; @@ -69,7 +69,7 @@ export function graphql(source: "\n query courseSessionDetail($courseSessionId: /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n query learningPathQuery($slug: String!) {\n learning_path(slug: $slug) {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n competence_certificate {\n ...CoursePageFields\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query learningPathQuery($slug: String!) {\n learning_path(slug: $slug) {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n competence_certificate {\n ...CoursePageFields\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"]; +export function graphql(source: "\n query courseQuery($slug: String!) {\n course(slug: $slug) {\n id\n slug\n category_name\n action_competences {\n competence_id\n ...CoursePageFields\n performance_criteria {\n competence_id\n learning_unit {\n id\n slug\n evaluate_url\n }\n ...CoursePageFields\n }\n }\n learning_path {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n competence_certificate {\n ...CoursePageFields\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query courseQuery($slug: String!) {\n course(slug: $slug) {\n id\n slug\n category_name\n action_competences {\n competence_id\n ...CoursePageFields\n performance_criteria {\n competence_id\n learning_unit {\n id\n slug\n evaluate_url\n }\n ...CoursePageFields\n }\n }\n learning_path {\n ...CoursePageFields\n topics {\n is_visible\n ...CoursePageFields\n circles {\n description\n goals\n ...CoursePageFields\n learning_sequences {\n icon\n ...CoursePageFields\n learning_units {\n evaluate_url\n ...CoursePageFields\n performance_criteria {\n ...CoursePageFields\n }\n learning_contents {\n can_user_self_toggle_course_completion\n ...CoursePageFields\n ... on LearningContentAssignmentObjectType {\n assignment_type\n content_assignment {\n id\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentEdoniqTestObjectType {\n checkbox_text\n competence_certificate {\n ...CoursePageFields\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/client/src/gql/graphql.ts b/client/src/gql/graphql.ts index 65a17523..592ff0c2 100644 --- a/client/src/gql/graphql.ts +++ b/client/src/gql/graphql.ts @@ -47,6 +47,20 @@ export type Scalars = { UUID: { input: string; output: string; } }; +export type ActionCompetenceObjectType = CoursePageInterface & { + __typename?: 'ActionCompetenceObjectType'; + competence_id: Scalars['String']['output']; + content_type: Scalars['String']['output']; + course?: Maybe; + frontend_url: Scalars['String']['output']; + id: Scalars['ID']['output']; + live: Scalars['Boolean']['output']; + performance_criteria: Array; + slug: Scalars['String']['output']; + title: Scalars['String']['output']; + translation_key: Scalars['String']['output']; +}; + /** An enumeration. */ export type AssignmentAssignmentAssignmentTypeChoices = /** CASEWORK */ @@ -234,8 +248,10 @@ export type CourseCourseSessionUserRoleChoices = export type CourseObjectType = { __typename?: 'CourseObjectType'; + action_competences: Array; category_name: Scalars['String']['output']; id: Scalars['ID']['output']; + learning_path: LearningPathObjectType; slug: Scalars['String']['output']; title: Scalars['String']['output']; }; @@ -640,6 +656,7 @@ export type PerformanceCriteriaObjectType = CoursePageInterface & { course?: Maybe; frontend_url: Scalars['String']['output']; id: Scalars['ID']['output']; + learning_unit?: Maybe; live: Scalars['Boolean']['output']; slug: Scalars['String']['output']; title: Scalars['String']['output']; @@ -699,6 +716,7 @@ export type QueryCompetenceCertificateListArgs = { export type QueryCourseArgs = { id?: InputMaybe; + slug?: InputMaybe; }; @@ -775,6 +793,8 @@ export type UpsertAssignmentCompletionMutationVariables = Exact<{ export type UpsertAssignmentCompletionMutation = { __typename?: 'Mutation', upsert_assignment_completion?: { __typename?: 'AssignmentCompletionMutation', assignment_completion?: { __typename?: 'AssignmentCompletionObjectType', id: string, completion_status: AssignmentAssignmentCompletionCompletionStatusChoices, submitted_at?: string | null, evaluation_submitted_at?: string | null, evaluation_points?: number | null, completion_data?: any | null, task_completion_data?: any | null } | null } | null }; +type CoursePageFieldsActionCompetenceObjectTypeFragment = { __typename?: 'ActionCompetenceObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsActionCompetenceObjectTypeFragment' }; + type CoursePageFieldsAssignmentObjectTypeFragment = { __typename?: 'AssignmentObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsAssignmentObjectTypeFragment' }; type CoursePageFieldsCircleObjectTypeFragment = { __typename?: 'CircleObjectType', title: string, id: string, slug: string, content_type: string, frontend_url: string } & { ' $fragmentName'?: 'CoursePageFieldsCircleObjectTypeFragment' }; @@ -813,7 +833,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 = CoursePageFieldsAssignmentObjectTypeFragment | CoursePageFieldsCircleObjectTypeFragment | CoursePageFieldsCompetenceCertificateListObjectTypeFragment | CoursePageFieldsCompetenceCertificateObjectTypeFragment | CoursePageFieldsLearningContentAssignmentObjectTypeFragment | CoursePageFieldsLearningContentAttendanceCourseObjectTypeFragment | CoursePageFieldsLearningContentDocumentListObjectTypeFragment | CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment | CoursePageFieldsLearningContentFeedbackObjectTypeFragment | CoursePageFieldsLearningContentLearningModuleObjectTypeFragment | CoursePageFieldsLearningContentMediaLibraryObjectTypeFragment | CoursePageFieldsLearningContentPlaceholderObjectTypeFragment | CoursePageFieldsLearningContentRichTextObjectTypeFragment | CoursePageFieldsLearningContentVideoObjectTypeFragment | CoursePageFieldsLearningPathObjectTypeFragment | CoursePageFieldsLearningSequenceObjectTypeFragment | CoursePageFieldsLearningUnitObjectTypeFragment | CoursePageFieldsPerformanceCriteriaObjectTypeFragment | CoursePageFieldsTopicObjectTypeFragment; +export type CoursePageFieldsFragment = CoursePageFieldsActionCompetenceObjectTypeFragment | CoursePageFieldsAssignmentObjectTypeFragment | CoursePageFieldsCircleObjectTypeFragment | CoursePageFieldsCompetenceCertificateListObjectTypeFragment | CoursePageFieldsCompetenceCertificateObjectTypeFragment | CoursePageFieldsLearningContentAssignmentObjectTypeFragment | CoursePageFieldsLearningContentAttendanceCourseObjectTypeFragment | CoursePageFieldsLearningContentDocumentListObjectTypeFragment | CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment | CoursePageFieldsLearningContentFeedbackObjectTypeFragment | CoursePageFieldsLearningContentLearningModuleObjectTypeFragment | CoursePageFieldsLearningContentMediaLibraryObjectTypeFragment | CoursePageFieldsLearningContentPlaceholderObjectTypeFragment | CoursePageFieldsLearningContentRichTextObjectTypeFragment | CoursePageFieldsLearningContentVideoObjectTypeFragment | CoursePageFieldsLearningPathObjectTypeFragment | CoursePageFieldsLearningSequenceObjectTypeFragment | CoursePageFieldsLearningUnitObjectTypeFragment | CoursePageFieldsPerformanceCriteriaObjectTypeFragment | CoursePageFieldsTopicObjectTypeFragment; export type AttendanceCheckQueryQueryVariables = Exact<{ courseSessionId: Scalars['ID']['input']; @@ -889,66 +909,72 @@ export type CourseSessionDetailQueryVariables = Exact<{ export type CourseSessionDetailQuery = { __typename?: 'Query', course_session?: { __typename?: 'CourseSessionObjectType', id: string, title: string, course: { __typename?: 'CourseObjectType', id: string, title: string, slug: string }, users: Array<{ __typename?: 'CourseSessionUserObjectsType', id: string, user_id: string, first_name: string, last_name: string, email: string, avatar_url: string, role: CourseCourseSessionUserRoleChoices, circles: Array<{ __typename?: 'CourseSessionUserExpertCircleType', id: string, title: string, slug: string }> }>, attendance_courses: Array<{ __typename?: 'CourseSessionAttendanceCourseObjectType', id: string, location: string, trainer: string, learning_content_id?: string | null, due_date?: { __typename?: 'DueDateObjectType', id: string, start?: string | null, end?: string | null } | null, learning_content: { __typename?: 'LearningContentAttendanceCourseObjectType', id: string, title: string, circle?: { __typename?: 'CircleLightObjectType', id: string, title: string, slug: string } | null } }>, assignments: Array<{ __typename?: 'CourseSessionAssignmentObjectType', id: string, submission_deadline?: { __typename?: 'DueDateObjectType', id: string, start?: string | null } | null, evaluation_deadline?: { __typename?: 'DueDateObjectType', id: string, start?: string | null } | null, learning_content: { __typename?: 'LearningContentAssignmentObjectType', id: string, title: string, content_assignment: { __typename?: 'AssignmentObjectType', id: string, title: string, assignment_type: AssignmentAssignmentAssignmentTypeChoices } } }>, edoniq_tests: Array<{ __typename?: 'CourseSessionEdoniqTestObjectType', id: string, deadline?: { __typename?: 'DueDateObjectType', id: string, start?: string | null, end?: string | null } | null, learning_content: { __typename?: 'LearningContentEdoniqTestObjectType', id: string, title: string, content_assignment?: { __typename?: 'AssignmentObjectType', id: string, title: string, assignment_type: AssignmentAssignmentAssignmentTypeChoices } | null } }> } | null }; -export type LearningPathQueryQueryVariables = Exact<{ +export type CourseQueryQueryVariables = Exact<{ slug: Scalars['String']['input']; }>; -export type LearningPathQueryQuery = { __typename?: 'Query', learning_path?: ( - { __typename?: 'LearningPathObjectType', topics: Array<( - { __typename?: 'TopicObjectType', is_visible: boolean, circles: Array<( - { __typename?: 'CircleObjectType', description: string, goals: string, learning_sequences: Array<( - { __typename?: 'LearningSequenceObjectType', icon: string, learning_units: Array<( - { __typename?: 'LearningUnitObjectType', evaluate_url: string, performance_criteria: Array<( - { __typename?: 'PerformanceCriteriaObjectType' } - & { ' $fragmentRefs'?: { 'CoursePageFieldsPerformanceCriteriaObjectTypeFragment': CoursePageFieldsPerformanceCriteriaObjectTypeFragment } } - )>, learning_contents: Array<( - { __typename?: 'LearningContentAssignmentObjectType', assignment_type: LearnpathLearningContentAssignmentAssignmentTypeChoices, can_user_self_toggle_course_completion: boolean, content_assignment: { __typename?: 'AssignmentObjectType', id: string }, competence_certificate?: ( - { __typename?: 'CompetenceCertificateObjectType' } - & { ' $fragmentRefs'?: { 'CoursePageFieldsCompetenceCertificateObjectTypeFragment': CoursePageFieldsCompetenceCertificateObjectTypeFragment } } - ) | null } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentAssignmentObjectTypeFragment': CoursePageFieldsLearningContentAssignmentObjectTypeFragment } } - ) | ( - { __typename?: 'LearningContentAttendanceCourseObjectType', can_user_self_toggle_course_completion: boolean } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentAttendanceCourseObjectTypeFragment': CoursePageFieldsLearningContentAttendanceCourseObjectTypeFragment } } - ) | ( - { __typename?: 'LearningContentDocumentListObjectType', can_user_self_toggle_course_completion: boolean } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentDocumentListObjectTypeFragment': CoursePageFieldsLearningContentDocumentListObjectTypeFragment } } - ) | ( - { __typename?: 'LearningContentEdoniqTestObjectType', checkbox_text: string, can_user_self_toggle_course_completion: boolean, competence_certificate?: ( - { __typename?: 'CompetenceCertificateObjectType' } - & { ' $fragmentRefs'?: { 'CoursePageFieldsCompetenceCertificateObjectTypeFragment': CoursePageFieldsCompetenceCertificateObjectTypeFragment } } - ) | null } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment': CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment } } - ) | ( - { __typename?: 'LearningContentFeedbackObjectType', can_user_self_toggle_course_completion: boolean } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackObjectTypeFragment': CoursePageFieldsLearningContentFeedbackObjectTypeFragment } } - ) | ( - { __typename?: 'LearningContentLearningModuleObjectType', can_user_self_toggle_course_completion: boolean } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentLearningModuleObjectTypeFragment': CoursePageFieldsLearningContentLearningModuleObjectTypeFragment } } - ) | ( - { __typename?: 'LearningContentMediaLibraryObjectType', can_user_self_toggle_course_completion: boolean } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentMediaLibraryObjectTypeFragment': CoursePageFieldsLearningContentMediaLibraryObjectTypeFragment } } - ) | ( - { __typename?: 'LearningContentPlaceholderObjectType', can_user_self_toggle_course_completion: boolean } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentPlaceholderObjectTypeFragment': CoursePageFieldsLearningContentPlaceholderObjectTypeFragment } } - ) | ( - { __typename?: 'LearningContentRichTextObjectType', can_user_self_toggle_course_completion: boolean } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentRichTextObjectTypeFragment': CoursePageFieldsLearningContentRichTextObjectTypeFragment } } - ) | ( - { __typename?: 'LearningContentVideoObjectType', can_user_self_toggle_course_completion: boolean } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentVideoObjectTypeFragment': CoursePageFieldsLearningContentVideoObjectTypeFragment } } - )> } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningUnitObjectTypeFragment': CoursePageFieldsLearningUnitObjectTypeFragment } } - )> } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningSequenceObjectTypeFragment': CoursePageFieldsLearningSequenceObjectTypeFragment } } - )> } - & { ' $fragmentRefs'?: { 'CoursePageFieldsCircleObjectTypeFragment': CoursePageFieldsCircleObjectTypeFragment } } +export type CourseQueryQuery = { __typename?: 'Query', course?: { __typename?: 'CourseObjectType', id: string, slug: string, category_name: string, action_competences: Array<( + { __typename?: 'ActionCompetenceObjectType', competence_id: string, performance_criteria: Array<( + { __typename?: 'PerformanceCriteriaObjectType', competence_id: string, learning_unit?: { __typename?: 'LearningUnitObjectType', id: string, slug: string, evaluate_url: string } | null } + & { ' $fragmentRefs'?: { 'CoursePageFieldsPerformanceCriteriaObjectTypeFragment': CoursePageFieldsPerformanceCriteriaObjectTypeFragment } } )> } - & { ' $fragmentRefs'?: { 'CoursePageFieldsTopicObjectTypeFragment': CoursePageFieldsTopicObjectTypeFragment } } - )> } - & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningPathObjectTypeFragment': CoursePageFieldsLearningPathObjectTypeFragment } } - ) | null }; + & { ' $fragmentRefs'?: { 'CoursePageFieldsActionCompetenceObjectTypeFragment': CoursePageFieldsActionCompetenceObjectTypeFragment } } + )>, learning_path: ( + { __typename?: 'LearningPathObjectType', topics: Array<( + { __typename?: 'TopicObjectType', is_visible: boolean, circles: Array<( + { __typename?: 'CircleObjectType', description: string, goals: string, learning_sequences: Array<( + { __typename?: 'LearningSequenceObjectType', icon: string, learning_units: Array<( + { __typename?: 'LearningUnitObjectType', evaluate_url: string, performance_criteria: Array<( + { __typename?: 'PerformanceCriteriaObjectType' } + & { ' $fragmentRefs'?: { 'CoursePageFieldsPerformanceCriteriaObjectTypeFragment': CoursePageFieldsPerformanceCriteriaObjectTypeFragment } } + )>, learning_contents: Array<( + { __typename?: 'LearningContentAssignmentObjectType', assignment_type: LearnpathLearningContentAssignmentAssignmentTypeChoices, can_user_self_toggle_course_completion: boolean, content_assignment: { __typename?: 'AssignmentObjectType', id: string }, competence_certificate?: ( + { __typename?: 'CompetenceCertificateObjectType' } + & { ' $fragmentRefs'?: { 'CoursePageFieldsCompetenceCertificateObjectTypeFragment': CoursePageFieldsCompetenceCertificateObjectTypeFragment } } + ) | null } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentAssignmentObjectTypeFragment': CoursePageFieldsLearningContentAssignmentObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentAttendanceCourseObjectType', can_user_self_toggle_course_completion: boolean } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentAttendanceCourseObjectTypeFragment': CoursePageFieldsLearningContentAttendanceCourseObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentDocumentListObjectType', can_user_self_toggle_course_completion: boolean } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentDocumentListObjectTypeFragment': CoursePageFieldsLearningContentDocumentListObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentEdoniqTestObjectType', checkbox_text: string, can_user_self_toggle_course_completion: boolean, competence_certificate?: ( + { __typename?: 'CompetenceCertificateObjectType' } + & { ' $fragmentRefs'?: { 'CoursePageFieldsCompetenceCertificateObjectTypeFragment': CoursePageFieldsCompetenceCertificateObjectTypeFragment } } + ) | null } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment': CoursePageFieldsLearningContentEdoniqTestObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentFeedbackObjectType', can_user_self_toggle_course_completion: boolean } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentFeedbackObjectTypeFragment': CoursePageFieldsLearningContentFeedbackObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentLearningModuleObjectType', can_user_self_toggle_course_completion: boolean } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentLearningModuleObjectTypeFragment': CoursePageFieldsLearningContentLearningModuleObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentMediaLibraryObjectType', can_user_self_toggle_course_completion: boolean } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentMediaLibraryObjectTypeFragment': CoursePageFieldsLearningContentMediaLibraryObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentPlaceholderObjectType', can_user_self_toggle_course_completion: boolean } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentPlaceholderObjectTypeFragment': CoursePageFieldsLearningContentPlaceholderObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentRichTextObjectType', can_user_self_toggle_course_completion: boolean } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentRichTextObjectTypeFragment': CoursePageFieldsLearningContentRichTextObjectTypeFragment } } + ) | ( + { __typename?: 'LearningContentVideoObjectType', can_user_self_toggle_course_completion: boolean } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningContentVideoObjectTypeFragment': CoursePageFieldsLearningContentVideoObjectTypeFragment } } + )> } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningUnitObjectTypeFragment': CoursePageFieldsLearningUnitObjectTypeFragment } } + )> } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningSequenceObjectTypeFragment': CoursePageFieldsLearningSequenceObjectTypeFragment } } + )> } + & { ' $fragmentRefs'?: { 'CoursePageFieldsCircleObjectTypeFragment': CoursePageFieldsCircleObjectTypeFragment } } + )> } + & { ' $fragmentRefs'?: { 'CoursePageFieldsTopicObjectTypeFragment': CoursePageFieldsTopicObjectTypeFragment } } + )> } + & { ' $fragmentRefs'?: { 'CoursePageFieldsLearningPathObjectTypeFragment': CoursePageFieldsLearningPathObjectTypeFragment } } + ) } | null }; export type SendFeedbackMutationMutationVariables = Exact<{ courseSessionId: Scalars['ID']['input']; @@ -967,5 +993,5 @@ export const AttendanceCheckQueryDocument = {"kind":"Document","definitions":[{" export const AssignmentCompletionQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"assignmentCompletionQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"learningContentId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"assignmentUserId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignment"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignment_type"}},{"kind":"Field","name":{"kind":"Name","value":"needs_expert_evaluation"}},{"kind":"Field","name":{"kind":"Name","value":"max_points"}},{"kind":"Field","name":{"kind":"Name","value":"content_type"}},{"kind":"Field","name":{"kind":"Name","value":"effort_required"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_description"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_document_url"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_tasks"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"intro_text"}},{"kind":"Field","name":{"kind":"Name","value":"performance_objectives"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"tasks"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"translation_key"}},{"kind":"Field","name":{"kind":"Name","value":"competence_certificate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"assignment_completion"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"assignment_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentId"}}},{"kind":"Argument","name":{"kind":"Name","value":"course_session_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}}},{"kind":"Argument","name":{"kind":"Name","value":"assignment_user_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"assignmentUserId"}}},{"kind":"Argument","name":{"kind":"Name","value":"learning_content_page_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"learningContentId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"completion_status"}},{"kind":"Field","name":{"kind":"Name","value":"submitted_at"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_submitted_at"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"assignment_user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_points"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_max_points"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_passed"}},{"kind":"Field","name":{"kind":"Name","value":"edoniq_extended_time_flag"}},{"kind":"Field","name":{"kind":"Name","value":"completion_data"}},{"kind":"Field","name":{"kind":"Name","value":"task_completion_data"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CoursePageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CoursePageInterface"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"content_type"}},{"kind":"Field","name":{"kind":"Name","value":"frontend_url"}}]}}]} as unknown as DocumentNode; export const CompetenceCertificateQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"competenceCertificateQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseSlug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"competence_certificate_list"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"course_slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseSlug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"competence_certificates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"assignments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"assignment_type"}},{"kind":"Field","name":{"kind":"Name","value":"max_points"}},{"kind":"Field","name":{"kind":"Name","value":"completion"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"course_session_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"completion_status"}},{"kind":"Field","name":{"kind":"Name","value":"submitted_at"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_points"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_max_points"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_passed"}}]}},{"kind":"Field","name":{"kind":"Name","value":"learning_content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"circle"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CoursePageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CoursePageInterface"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"content_type"}},{"kind":"Field","name":{"kind":"Name","value":"frontend_url"}}]}}]} as unknown as DocumentNode; export const CourseSessionDetailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"courseSessionDetail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"course_session"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"course"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"Field","name":{"kind":"Name","value":"users"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"user_id"}},{"kind":"Field","name":{"kind":"Name","value":"first_name"}},{"kind":"Field","name":{"kind":"Name","value":"last_name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"avatar_url"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"circles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"attendance_courses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"location"}},{"kind":"Field","name":{"kind":"Name","value":"trainer"}},{"kind":"Field","name":{"kind":"Name","value":"due_date"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"start"}},{"kind":"Field","name":{"kind":"Name","value":"end"}}]}},{"kind":"Field","name":{"kind":"Name","value":"learning_content_id"}},{"kind":"Field","name":{"kind":"Name","value":"learning_content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"circle"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"assignments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"submission_deadline"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"start"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_deadline"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"start"}}]}},{"kind":"Field","name":{"kind":"Name","value":"learning_content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"content_assignment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"assignment_type"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"edoniq_tests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"deadline"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"start"}},{"kind":"Field","name":{"kind":"Name","value":"end"}}]}},{"kind":"Field","name":{"kind":"Name","value":"learning_content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"content_assignment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"assignment_type"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const LearningPathQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"learningPathQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"learning_path"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"slug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"topics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"is_visible"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"circles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"goals"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"learning_sequences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"learning_units"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evaluate_url"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"performance_criteria"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"learning_contents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"can_user_self_toggle_course_completion"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningContentAssignmentObjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignment_type"}},{"kind":"Field","name":{"kind":"Name","value":"content_assignment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"competence_certificate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningContentEdoniqTestObjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"checkbox_text"}},{"kind":"Field","name":{"kind":"Name","value":"competence_certificate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}}]}}]}}]}}]}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CoursePageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CoursePageInterface"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"content_type"}},{"kind":"Field","name":{"kind":"Name","value":"frontend_url"}}]}}]} as unknown as DocumentNode; +export const CourseQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"courseQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"course"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"slug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"category_name"}},{"kind":"Field","name":{"kind":"Name","value":"action_competences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"competence_id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"performance_criteria"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"competence_id"}},{"kind":"Field","name":{"kind":"Name","value":"learning_unit"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"evaluate_url"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"learning_path"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"topics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"is_visible"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"circles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"goals"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"learning_sequences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"learning_units"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evaluate_url"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"Field","name":{"kind":"Name","value":"performance_criteria"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"learning_contents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"can_user_self_toggle_course_completion"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningContentAssignmentObjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignment_type"}},{"kind":"Field","name":{"kind":"Name","value":"content_assignment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"competence_certificate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningContentEdoniqTestObjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"checkbox_text"}},{"kind":"Field","name":{"kind":"Name","value":"competence_certificate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoursePageFields"}}]}}]}}]}}]}}]}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CoursePageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CoursePageInterface"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"content_type"}},{"kind":"Field","name":{"kind":"Name","value":"frontend_url"}}]}}]} as unknown as DocumentNode; export const SendFeedbackMutationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SendFeedbackMutation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"learningContentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"GenericScalar"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"submitted"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"send_feedback"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"course_session_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseSessionId"}}},{"kind":"Argument","name":{"kind":"Name","value":"learning_content_page_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"learningContentId"}}},{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}},{"kind":"Argument","name":{"kind":"Name","value":"submitted"},"value":{"kind":"Variable","name":{"kind":"Name","value":"submitted"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"feedback_response"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"data"}},{"kind":"Field","name":{"kind":"Name","value":"submitted"}}]}},{"kind":"Field","name":{"kind":"Name","value":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"Field","name":{"kind":"Name","value":"messages"}}]}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/client/src/gql/schema.graphql b/client/src/gql/schema.graphql index b0365d00..d8e91139 100644 --- a/client/src/gql/schema.graphql +++ b/client/src/gql/schema.graphql @@ -1,5 +1,8 @@ type Query { learning_path(id: ID, slug: String, course_id: ID, course_slug: String): LearningPathObjectType + course_session_attendance_course(id: ID!, assignment_user_id: ID): CourseSessionAttendanceCourseObjectType + course(id: ID, slug: String): CourseObjectType + course_session(id: ID): CourseSessionObjectType learning_content_media_library: LearningContentMediaLibraryObjectType learning_content_assignment: LearningContentAssignmentObjectType learning_content_attendance_course: LearningContentAttendanceCourseObjectType @@ -10,9 +13,6 @@ type Query { learning_content_test: LearningContentEdoniqTestObjectType learning_content_video: LearningContentVideoObjectType learning_content_document_list: LearningContentDocumentListObjectType - course_session_attendance_course(id: ID!, assignment_user_id: ID): CourseSessionAttendanceCourseObjectType - course(id: ID): CourseObjectType - course_session(id: ID): CourseSessionObjectType competence_certificate(id: ID, slug: String): CompetenceCertificateObjectType competence_certificate_list(id: ID, slug: String, course_id: ID, course_slug: String): CompetenceCertificateListObjectType assignment(id: ID, slug: String): AssignmentObjectType @@ -47,6 +47,71 @@ type CourseObjectType { title: String! category_name: String! slug: String! + learning_path: LearningPathObjectType! + action_competences: [ActionCompetenceObjectType!]! +} + +type ActionCompetenceObjectType implements CoursePageInterface { + competence_id: String! + id: ID! + title: String! + slug: String! + content_type: String! + live: Boolean! + translation_key: String! + frontend_url: String! + course: CourseObjectType + performance_criteria: [PerformanceCriteriaObjectType!]! +} + +type PerformanceCriteriaObjectType implements CoursePageInterface { + competence_id: String! + id: ID! + title: String! + slug: String! + content_type: String! + live: Boolean! + translation_key: String! + frontend_url: String! + course: CourseObjectType + learning_unit: LearningUnitObjectType +} + +type LearningUnitObjectType implements CoursePageInterface { + title_hidden: Boolean! + id: ID! + title: String! + slug: String! + content_type: String! + live: Boolean! + translation_key: String! + frontend_url: String! + course: CourseObjectType + learning_contents: [LearningContentInterface!]! + performance_criteria: [PerformanceCriteriaObjectType!]! + evaluate_url: String! +} + +interface 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 CircleLightObjectType { + id: ID! + title: String! + slug: String! } type TopicObjectType implements CoursePageInterface { @@ -89,22 +154,18 @@ type LearningSequenceObjectType implements CoursePageInterface { learning_units: [LearningUnitObjectType!]! } -type LearningUnitObjectType implements CoursePageInterface { - title_hidden: Boolean! +type CourseSessionAttendanceCourseObjectType { id: ID! - title: String! - slug: String! - content_type: String! - live: Boolean! - translation_key: String! - frontend_url: String! - course: CourseObjectType - learning_contents: [LearningContentInterface!]! - performance_criteria: [PerformanceCriteriaObjectType!]! - evaluate_url: String! + learning_content: LearningContentAttendanceCourseObjectType! + due_date: DueDateObjectType + location: String! + trainer: String! + course_session_id: ID + learning_content_id: ID + attendance_user_list: [AttendanceUserObjectType] } -interface LearningContentInterface { +type LearningContentAttendanceCourseObjectType implements CoursePageInterface & LearningContentInterface { id: ID! title: String! slug: String! @@ -120,38 +181,74 @@ interface LearningContentInterface { circle: CircleLightObjectType } -type CircleLightObjectType { +type DueDateObjectType { id: ID! + + """Startdatum ist Pflicht""" + start: DateTime + + """Enddatum ist optional""" + end: DateTime + + """Nur aktivieren, wenn man die Felder manuell überschreiben will""" + manual_override_fields: Boolean! + + """Title wird standarmässig vom LearningContent übernommen""" title: String! - slug: String! + + """Translation Key aus dem Frontend""" + assignment_type_translation_key: String! + + """Translation Key aus dem Frontend""" + date_type_translation_key: String! + + """ + Überschreibt den Untertitel bei `assignment_type_translation_key` und `date_type_translation_key` + """ + subtitle: String! + + """ + URL wird vom LearningContent übernommen (sichtbar für Member/Teilnehmer) + """ + url: String! + course_session: CourseSessionObjectType! } -type PerformanceCriteriaObjectType implements CoursePageInterface { - competence_id: String! +""" +The `DateTime` scalar type represents a DateTime +value as specified by +[iso8601](https://en.wikipedia.org/wiki/ISO_8601). +""" +scalar DateTime + +type CourseSessionObjectType { id: ID! + created_at: DateTime! + updated_at: DateTime! + course: CourseObjectType! title: String! - slug: String! - content_type: String! - live: Boolean! - translation_key: String! - frontend_url: String! - course: CourseObjectType + start_date: Date + end_date: Date + attendance_courses: [CourseSessionAttendanceCourseObjectType!]! + assignments: [CourseSessionAssignmentObjectType!]! + edoniq_tests: [CourseSessionEdoniqTestObjectType!]! + users: [CourseSessionUserObjectsType!]! } -type LearningContentMediaLibraryObjectType implements CoursePageInterface & LearningContentInterface { +""" +The `Date` scalar type represents a Date +value as specified by +[iso8601](https://en.wikipedia.org/wiki/ISO_8601). +""" +scalar Date + +type CourseSessionAssignmentObjectType { 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 + learning_content: LearningContentAssignmentObjectType! + submission_deadline: DueDateObjectType + evaluation_deadline: DueDateObjectType + course_session_id: ID! + learning_content_id: ID! } type LearningContentAssignmentObjectType implements CoursePageInterface & LearningContentInterface { @@ -268,13 +365,6 @@ in fields, resolvers and input. """ scalar UUID -""" -The `DateTime` scalar type represents a DateTime -value as specified by -[iso8601](https://en.wikipedia.org/wiki/ISO_8601). -""" -scalar DateTime - type UserObjectType { """ Erforderlich. 150 Zeichen oder weniger. Nur Buchstaben, Ziffern und @/./+/-/_. @@ -300,108 +390,52 @@ enum CoreUserLanguageChoices { IT } -type CourseSessionObjectType { - id: ID! - created_at: DateTime! - updated_at: DateTime! - course: CourseObjectType! - title: String! - start_date: Date - end_date: Date - attendance_courses: [CourseSessionAttendanceCourseObjectType!]! - assignments: [CourseSessionAssignmentObjectType!]! - edoniq_tests: [CourseSessionEdoniqTestObjectType!]! - users: [CourseSessionUserObjectsType!]! +"""An enumeration.""" +enum AssignmentAssignmentCompletionCompletionStatusChoices { + """IN_PROGRESS""" + IN_PROGRESS + + """SUBMITTED""" + SUBMITTED + + """EVALUATION_IN_PROGRESS""" + EVALUATION_IN_PROGRESS + + """EVALUATION_SUBMITTED""" + EVALUATION_SUBMITTED } """ -The `Date` scalar type represents a Date -value as specified by -[iso8601](https://en.wikipedia.org/wiki/ISO_8601). +The `GenericScalar` scalar type represents a generic +GraphQL scalar value that could be: +String, Boolean, Int, Float, List or Object. """ -scalar Date +scalar GenericScalar -type CourseSessionAttendanceCourseObjectType { - id: ID! - learning_content: LearningContentAttendanceCourseObjectType! - due_date: DueDateObjectType - location: String! - trainer: String! - course_session_id: ID - learning_content_id: ID - attendance_user_list: [AttendanceUserObjectType] -} +""" +Allows use of a JSON String for input / output from the GraphQL schema. -type LearningContentAttendanceCourseObjectType 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 DueDateObjectType { - id: ID! - - """Startdatum ist Pflicht""" - start: DateTime - - """Enddatum ist optional""" - end: DateTime - - """Nur aktivieren, wenn man die Felder manuell überschreiben will""" - manual_override_fields: Boolean! - - """Title wird standarmässig vom LearningContent übernommen""" - title: String! - - """Translation Key aus dem Frontend""" - assignment_type_translation_key: String! - - """Translation Key aus dem Frontend""" - date_type_translation_key: String! - - """ - Überschreibt den Untertitel bei `assignment_type_translation_key` und `date_type_translation_key` - """ - subtitle: String! - - """ - URL wird vom LearningContent übernommen (sichtbar für Member/Teilnehmer) - """ - url: String! - course_session: CourseSessionObjectType! -} - -type AttendanceUserObjectType { - user_id: UUID! - status: AttendanceUserStatus! - first_name: String - last_name: String - email: String -} +Use of this type is *not recommended* as you lose the benefits of having a defined, static +schema (one of the key benefits of GraphQL). +""" +scalar JSONString """An enumeration.""" -enum AttendanceUserStatus { - PRESENT - ABSENT -} +enum LearnpathLearningContentAssignmentAssignmentTypeChoices { + """CASEWORK""" + CASEWORK -type CourseSessionAssignmentObjectType { - id: ID! - learning_content: LearningContentAssignmentObjectType! - submission_deadline: DueDateObjectType - evaluation_deadline: DueDateObjectType - course_session_id: ID! - learning_content_id: ID! + """PREP_ASSIGNMENT""" + PREP_ASSIGNMENT + + """REFLECTION""" + REFLECTION + + """CONDITION_ACCEPTANCE""" + CONDITION_ACCEPTANCE + + """EDONIQ_TEST""" + EDONIQ_TEST } type CourseSessionEdoniqTestObjectType { @@ -460,52 +494,34 @@ type CourseSessionUserExpertCircleType { slug: String! } -"""An enumeration.""" -enum AssignmentAssignmentCompletionCompletionStatusChoices { - """IN_PROGRESS""" - IN_PROGRESS - - """SUBMITTED""" - SUBMITTED - - """EVALUATION_IN_PROGRESS""" - EVALUATION_IN_PROGRESS - - """EVALUATION_SUBMITTED""" - EVALUATION_SUBMITTED +type AttendanceUserObjectType { + user_id: UUID! + status: AttendanceUserStatus! + first_name: String + last_name: String + email: String } -""" -The `GenericScalar` scalar type represents a generic -GraphQL scalar value that could be: -String, Boolean, Int, Float, List or Object. -""" -scalar GenericScalar - -""" -Allows use of a JSON String for input / output from the GraphQL schema. - -Use of this type is *not recommended* as you lose the benefits of having a defined, static -schema (one of the key benefits of GraphQL). -""" -scalar JSONString - """An enumeration.""" -enum LearnpathLearningContentAssignmentAssignmentTypeChoices { - """CASEWORK""" - CASEWORK +enum AttendanceUserStatus { + PRESENT + ABSENT +} - """PREP_ASSIGNMENT""" - PREP_ASSIGNMENT - - """REFLECTION""" - REFLECTION - - """CONDITION_ACCEPTANCE""" - CONDITION_ACCEPTANCE - - """EDONIQ_TEST""" - EDONIQ_TEST +type LearningContentMediaLibraryObjectType 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 LearningContentFeedbackObjectType implements CoursePageInterface & LearningContentInterface { diff --git a/client/src/gql/typenames.ts b/client/src/gql/typenames.ts index d5fe093e..2302eac2 100644 --- a/client/src/gql/typenames.ts +++ b/client/src/gql/typenames.ts @@ -1,3 +1,4 @@ +export const ActionCompetenceObjectType = "ActionCompetenceObjectType"; export const AssignmentAssignmentAssignmentTypeChoices = "AssignmentAssignmentAssignmentTypeChoices"; export const AssignmentAssignmentCompletionCompletionStatusChoices = "AssignmentAssignmentCompletionCompletionStatusChoices"; export const AssignmentCompletionMutation = "AssignmentCompletionMutation"; diff --git a/client/src/graphql/queries.ts b/client/src/graphql/queries.ts index 463906c6..d9a0fa45 100644 --- a/client/src/graphql/queries.ts +++ b/client/src/graphql/queries.ts @@ -193,42 +193,60 @@ export const COURSE_SESSION_DETAIL_QUERY = graphql(` } `); -export const LEARNING_PATH_QUERY = graphql(` - query learningPathQuery($slug: String!) { - learning_path(slug: $slug) { - ...CoursePageFields - topics { - is_visible +export const COURSE_QUERY = graphql(` + query courseQuery($slug: String!) { + course(slug: $slug) { + id + slug + category_name + action_competences { + competence_id ...CoursePageFields - circles { - description - goals + performance_criteria { + competence_id + learning_unit { + id + slug + evaluate_url + } ...CoursePageFields - learning_sequences { - icon + } + } + learning_path { + ...CoursePageFields + topics { + is_visible + ...CoursePageFields + circles { + description + goals ...CoursePageFields - learning_units { - evaluate_url + learning_sequences { + icon ...CoursePageFields - performance_criteria { + learning_units { + evaluate_url ...CoursePageFields - } - learning_contents { - can_user_self_toggle_course_completion - ...CoursePageFields - ... on LearningContentAssignmentObjectType { - assignment_type - content_assignment { - id - } - competence_certificate { - ...CoursePageFields - } + performance_criteria { + ...CoursePageFields } - ... on LearningContentEdoniqTestObjectType { - checkbox_text - competence_certificate { - ...CoursePageFields + learning_contents { + can_user_self_toggle_course_completion + ...CoursePageFields + ... on LearningContentAssignmentObjectType { + assignment_type + content_assignment { + id + } + competence_certificate { + ...CoursePageFields + } + } + ... on LearningContentEdoniqTestObjectType { + checkbox_text + competence_certificate { + ...CoursePageFields + } } } } diff --git a/client/src/pages/cockpit/CockpitParentPage.vue b/client/src/pages/cockpit/CockpitParentPage.vue index ab476a8d..72af6e95 100644 --- a/client/src/pages/cockpit/CockpitParentPage.vue +++ b/client/src/pages/cockpit/CockpitParentPage.vue @@ -1,7 +1,6 @@