From d66e392c737b0ef8a2828a8cad57710db92500d0 Mon Sep 17 00:00:00 2001 From: Reto Aebersold Date: Thu, 26 Oct 2023 17:25:53 +0200 Subject: [PATCH] feat: stats dashboard --- client/src/gql/gql.ts | 9 +- client/src/gql/graphql.ts | 193 ++++++++++-------- client/src/gql/schema.graphql | 99 +++++---- client/src/gql/typenames.ts | 34 +-- client/src/graphql/queries.ts | 116 ++++++++++- client/src/pages/dashboard/ProgressPage.vue | 129 +++++++----- client/src/pages/dashboard/StatisticPage.vue | 64 +++++- client/src/stores/dashboard.ts | 42 +++- .../vbv_lernwelt/dashboard/graphql/queries.py | 2 +- .../dashboard/graphql/types/feedback.py | 9 +- .../dashboard/tests/graphql/test_dashboard.py | 4 +- 11 files changed, 492 insertions(+), 209 deletions(-) diff --git a/client/src/gql/gql.ts b/client/src/gql/gql.ts index cebf49b4..535c22f4 100644 --- a/client/src/gql/gql.ts +++ b/client/src/gql/gql.ts @@ -22,7 +22,8 @@ const documents = { "\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 courseQuery($slug: String!) {\n course(slug: $slug) {\n id\n title\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 content_url\n minutes\n description\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 has_extended_time_test\n content_assignment {\n id\n }\n competence_certificate {\n ...CoursePageFields\n }\n }\n ... on LearningContentRichTextObjectType {\n text\n }\n }\n }\n }\n }\n }\n }\n }\n }\n": types.CourseQueryDocument, "\n query dashboardConfig {\n dashboard_config {\n id\n slug\n name\n dashboard_type\n }\n }\n": types.DashboardConfigDocument, - "\n query dashboardProgress($courseId: ID!) {\n course_progress(course_id: $courseId) {\n id\n session_to_continue_id\n competence {\n _id\n total_count\n success_count\n fail_count\n }\n assignment {\n _id\n total_count\n points_max_count\n points_achieved_count\n }\n }\n }\n": types.DashboardProgressDocument, + "\n query dashboardProgress($courseId: ID!) {\n course_progress(course_id: $courseId) {\n _id\n course_id\n session_to_continue_id\n competence {\n _id\n total_count\n success_count\n fail_count\n }\n assignment {\n _id\n total_count\n points_max_count\n points_achieved_count\n }\n }\n }\n": types.DashboardProgressDocument, + "\n query courseStatistics($course_id: ID!) {\n course_statistics(course_id: $course_id) {\n _id\n course_id\n course_title\n course_slug\n course_session_properties {\n _id\n sessions {\n _id\n session_id\n session_title\n }\n generations\n circles {\n _id\n circle_id\n circle_title\n experts\n }\n }\n course_session_selection_ids\n course_session_selection_metrics {\n _id\n session_count\n participant_count\n expert_count\n }\n attendance_day_presences {\n _id\n records {\n _id\n course_session_id\n generation\n circle_id\n due_date\n participants_present\n participants_total\n details_url\n }\n summary {\n _id\n days_completed\n participants_present\n }\n }\n feedback_responses {\n _id\n records {\n _id\n course_session_id\n generation\n circle_id\n satisfaction_average\n satisfaction_max\n details_url\n }\n summary {\n _id\n satisfaction_average\n satisfaction_max\n total_responses\n }\n }\n assignments {\n _id\n summary {\n _id\n completed_count\n average_passed\n }\n records {\n _id\n course_session_id\n course_session_assignment_id\n circle_id\n generation\n assignment_title\n assignment_type_translation_key\n details_url\n deadline\n metrics {\n _id\n passed_count\n failed_count\n unranked_count\n ranking_completed\n average_passed\n }\n }\n }\n competences {\n _id\n summary {\n _id\n success_total\n fail_total\n }\n performances {\n _id\n course_session_id\n generation\n circle_id\n success_count\n fail_count\n details_url\n }\n }\n }\n }\n": types.CourseStatisticsDocument, "\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, }; @@ -79,7 +80,11 @@ export function graphql(source: "\n query dashboardConfig {\n dashboard_conf /** * 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 dashboardProgress($courseId: ID!) {\n course_progress(course_id: $courseId) {\n id\n session_to_continue_id\n competence {\n _id\n total_count\n success_count\n fail_count\n }\n assignment {\n _id\n total_count\n points_max_count\n points_achieved_count\n }\n }\n }\n"): (typeof documents)["\n query dashboardProgress($courseId: ID!) {\n course_progress(course_id: $courseId) {\n id\n session_to_continue_id\n competence {\n _id\n total_count\n success_count\n fail_count\n }\n assignment {\n _id\n total_count\n points_max_count\n points_achieved_count\n }\n }\n }\n"]; +export function graphql(source: "\n query dashboardProgress($courseId: ID!) {\n course_progress(course_id: $courseId) {\n _id\n course_id\n session_to_continue_id\n competence {\n _id\n total_count\n success_count\n fail_count\n }\n assignment {\n _id\n total_count\n points_max_count\n points_achieved_count\n }\n }\n }\n"): (typeof documents)["\n query dashboardProgress($courseId: ID!) {\n course_progress(course_id: $courseId) {\n _id\n course_id\n session_to_continue_id\n competence {\n _id\n total_count\n success_count\n fail_count\n }\n assignment {\n _id\n total_count\n points_max_count\n points_achieved_count\n }\n }\n }\n"]; +/** + * 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 courseStatistics($course_id: ID!) {\n course_statistics(course_id: $course_id) {\n _id\n course_id\n course_title\n course_slug\n course_session_properties {\n _id\n sessions {\n _id\n session_id\n session_title\n }\n generations\n circles {\n _id\n circle_id\n circle_title\n experts\n }\n }\n course_session_selection_ids\n course_session_selection_metrics {\n _id\n session_count\n participant_count\n expert_count\n }\n attendance_day_presences {\n _id\n records {\n _id\n course_session_id\n generation\n circle_id\n due_date\n participants_present\n participants_total\n details_url\n }\n summary {\n _id\n days_completed\n participants_present\n }\n }\n feedback_responses {\n _id\n records {\n _id\n course_session_id\n generation\n circle_id\n satisfaction_average\n satisfaction_max\n details_url\n }\n summary {\n _id\n satisfaction_average\n satisfaction_max\n total_responses\n }\n }\n assignments {\n _id\n summary {\n _id\n completed_count\n average_passed\n }\n records {\n _id\n course_session_id\n course_session_assignment_id\n circle_id\n generation\n assignment_title\n assignment_type_translation_key\n details_url\n deadline\n metrics {\n _id\n passed_count\n failed_count\n unranked_count\n ranking_completed\n average_passed\n }\n }\n }\n competences {\n _id\n summary {\n _id\n success_total\n fail_total\n }\n performances {\n _id\n course_session_id\n generation\n circle_id\n success_count\n fail_count\n details_url\n }\n }\n }\n }\n"): (typeof documents)["\n query courseStatistics($course_id: ID!) {\n course_statistics(course_id: $course_id) {\n _id\n course_id\n course_title\n course_slug\n course_session_properties {\n _id\n sessions {\n _id\n session_id\n session_title\n }\n generations\n circles {\n _id\n circle_id\n circle_title\n experts\n }\n }\n course_session_selection_ids\n course_session_selection_metrics {\n _id\n session_count\n participant_count\n expert_count\n }\n attendance_day_presences {\n _id\n records {\n _id\n course_session_id\n generation\n circle_id\n due_date\n participants_present\n participants_total\n details_url\n }\n summary {\n _id\n days_completed\n participants_present\n }\n }\n feedback_responses {\n _id\n records {\n _id\n course_session_id\n generation\n circle_id\n satisfaction_average\n satisfaction_max\n details_url\n }\n summary {\n _id\n satisfaction_average\n satisfaction_max\n total_responses\n }\n }\n assignments {\n _id\n summary {\n _id\n completed_count\n average_passed\n }\n records {\n _id\n course_session_id\n course_session_assignment_id\n circle_id\n generation\n assignment_title\n assignment_type_translation_key\n details_url\n deadline\n metrics {\n _id\n passed_count\n failed_count\n unranked_count\n ranking_completed\n average_passed\n }\n }\n }\n competences {\n _id\n summary {\n _id\n success_total\n fail_total\n }\n performances {\n _id\n course_session_id\n generation\n circle_id\n success_count\n fail_count\n details_url\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 7495951a..8ec89606 100644 --- a/client/src/gql/graphql.ts +++ b/client/src/gql/graphql.ts @@ -85,8 +85,9 @@ export type AssignmentAssignmentCompletionCompletionStatusChoices = /** SUBMITTED */ | 'SUBMITTED'; -export type AssignmentCompletionMetrics = { - __typename?: 'AssignmentCompletionMetrics'; +export type AssignmentCompletionMetricsType = { + __typename?: 'AssignmentCompletionMetricsType'; + _id: Scalars['ID']['output']; average_passed: Scalars['Float']['output']; failed_count: Scalars['Int']['output']; passed_count: Scalars['Int']['output']; @@ -165,8 +166,9 @@ export type AssignmentObjectTypeCompletionArgs = { learning_content_page_id?: InputMaybe; }; -export type AssignmentRecord = { - __typename?: 'AssignmentRecord'; +export type AssignmentStatisticsRecordType = { + __typename?: 'AssignmentStatisticsRecordType'; + _id: Scalars['ID']['output']; assignment_title: Scalars['String']['output']; assignment_type_translation_key: Scalars['String']['output']; circle_id: Scalars['ID']['output']; @@ -175,19 +177,21 @@ export type AssignmentRecord = { deadline: Scalars['DateTime']['output']; details_url: Scalars['String']['output']; generation: Scalars['String']['output']; - metrics: AssignmentCompletionMetrics; + metrics: AssignmentCompletionMetricsType; }; -export type AssignmentSummary = { - __typename?: 'AssignmentSummary'; +export type AssignmentStatisticsSummaryType = { + __typename?: 'AssignmentStatisticsSummaryType'; + _id: Scalars['ID']['output']; average_passed: Scalars['Float']['output']; completed_count: Scalars['Int']['output']; }; -export type Assignments = { - __typename?: 'Assignments'; - records: Array>; - summary: AssignmentSummary; +export type AssignmentsStatisticsType = { + __typename?: 'AssignmentsStatisticsType'; + _id: Scalars['ID']['output']; + records: Array>; + summary: AssignmentStatisticsSummaryType; }; export type AttendanceCourseUserMutation = { @@ -195,14 +199,16 @@ export type AttendanceCourseUserMutation = { course_session_attendance_course?: Maybe; }; -export type AttendanceDayPresences = { - __typename?: 'AttendanceDayPresences'; - records: Array>; - summary: AttendanceSummary; +export type AttendanceDayPresencesStatisticsType = { + __typename?: 'AttendanceDayPresencesStatisticsType'; + _id: Scalars['ID']['output']; + records: Array>; + summary: AttendanceSummaryStatisticsType; }; -export type AttendanceSummary = { - __typename?: 'AttendanceSummary'; +export type AttendanceSummaryStatisticsType = { + __typename?: 'AttendanceSummaryStatisticsType'; + _id: Scalars['ID']['output']; days_completed: Scalars['Int']['output']; participants_present: Scalars['Int']['output']; }; @@ -226,13 +232,6 @@ export type AttendanceUserStatus = | 'ABSENT' | 'PRESENT'; -export type CircleData = { - __typename?: 'CircleData'; - circle_id: Scalars['ID']['output']; - circle_title: Scalars['String']['output']; - experts: Array>; -}; - export type CircleLightObjectType = { __typename?: 'CircleLightObjectType'; id: Scalars['ID']['output']; @@ -281,8 +280,16 @@ export type CompetenceCertificateObjectType = CoursePageInterface & { translation_key: Scalars['String']['output']; }; -export type CompetencePerformance = { - __typename?: 'CompetencePerformance'; +export type CompetencePerformanceStatisticsSummaryType = { + __typename?: 'CompetencePerformanceStatisticsSummaryType'; + _id: Scalars['ID']['output']; + fail_total: Scalars['Int']['output']; + success_total: Scalars['Int']['output']; +}; + +export type CompetencePerformanceStatisticsType = { + __typename?: 'CompetencePerformanceStatisticsType'; + _id: Scalars['ID']['output']; circle_id: Scalars['ID']['output']; course_session_id: Scalars['ID']['output']; details_url: Scalars['String']['output']; @@ -291,16 +298,11 @@ export type CompetencePerformance = { success_count: Scalars['Int']['output']; }; -export type Competences = { - __typename?: 'Competences'; - performances: Array>; - summary: CompletionSummary; -}; - -export type CompletionSummary = { - __typename?: 'CompletionSummary'; - fail_total: Scalars['Int']['output']; - success_total: Scalars['Int']['output']; +export type CompetencesStatisticsType = { + __typename?: 'CompetencesStatisticsType'; + _id: Scalars['ID']['output']; + performances: Array>; + summary: CompetencePerformanceStatisticsSummaryType; }; /** An enumeration. */ @@ -344,9 +346,10 @@ export type CoursePageInterface = { export type CourseProgressType = { __typename?: 'CourseProgressType'; + _id: Scalars['ID']['output']; assignment: ProgressDashboardAssignmentType; competence: ProgressDashboardCompetenceType; - id: Scalars['ID']['output']; + course_id: Scalars['ID']['output']; session_to_continue_id?: Maybe; }; @@ -372,12 +375,6 @@ export type CourseSessionAttendanceCourseObjectType = { trainer: Scalars['String']['output']; }; -export type CourseSessionData = { - __typename?: 'CourseSessionData'; - session_id: Scalars['ID']['output']; - session_title: Scalars['String']['output']; -}; - export type CourseSessionEdoniqTestObjectType = { __typename?: 'CourseSessionEdoniqTestObjectType'; course_session_id: Scalars['ID']['output']; @@ -402,13 +399,6 @@ export type CourseSessionObjectType = { users: Array; }; -export type CourseSessionProperties = { - __typename?: 'CourseSessionProperties'; - circles: Array>; - generations: Array>; - sessions: Array>; -}; - export type CourseSessionUserExpertCircleType = { __typename?: 'CourseSessionUserExpertCircleType'; id: Scalars['ID']['output']; @@ -428,25 +418,19 @@ export type CourseSessionUserObjectsType = { user_id: Scalars['UUID']['output']; }; -export type CourseSessionsSelectionMetrics = { - __typename?: 'CourseSessionsSelectionMetrics'; - expert_count: Scalars['Int']['output']; - participant_count: Scalars['Int']['output']; - session_count: Scalars['Int']['output']; -}; - export type CourseStatisticsType = { __typename?: 'CourseStatisticsType'; - assignments: Assignments; - attendance_day_presences: AttendanceDayPresences; - competences: Competences; - course_session_properties: CourseSessionProperties; + _id: Scalars['ID']['output']; + assignments: AssignmentsStatisticsType; + attendance_day_presences: AttendanceDayPresencesStatisticsType; + competences: CompetencesStatisticsType; + course_id: Scalars['ID']['output']; + course_session_properties: StatisticsCourseSessionPropertiesType; course_session_selection_ids: Array>; - course_session_selection_metrics: CourseSessionsSelectionMetrics; + course_session_selection_metrics: StatisticsCourseSessionsSelectionMetricType; course_slug: Scalars['String']['output']; course_title: Scalars['String']['output']; - feedback_responses: FeedbackResponses; - id: Scalars['ID']['output']; + feedback_responses: FeedbackStatisticsResponsesType; }; export type DashboardConfigType = { @@ -490,8 +474,16 @@ export type ErrorType = { messages: Array; }; -export type FeedbackRecord = { - __typename?: 'FeedbackRecord'; +export type FeedbackResponseObjectType = { + __typename?: 'FeedbackResponseObjectType'; + data?: Maybe; + id: Scalars['UUID']['output']; + submitted: Scalars['Boolean']['output']; +}; + +export type FeedbackStatisticsRecordType = { + __typename?: 'FeedbackStatisticsRecordType'; + _id: Scalars['ID']['output']; circle_id: Scalars['ID']['output']; course_session_id: Scalars['ID']['output']; details_url: Scalars['String']['output']; @@ -500,21 +492,16 @@ export type FeedbackRecord = { satisfaction_max: Scalars['Int']['output']; }; -export type FeedbackResponseObjectType = { - __typename?: 'FeedbackResponseObjectType'; - data?: Maybe; - id: Scalars['UUID']['output']; - submitted: Scalars['Boolean']['output']; +export type FeedbackStatisticsResponsesType = { + __typename?: 'FeedbackStatisticsResponsesType'; + _id: Scalars['ID']['output']; + records: Array>; + summary: FeedbackStatisticsSummaryType; }; -export type FeedbackResponses = { - __typename?: 'FeedbackResponses'; - records: Array>; - summary: FeedbackSummary; -}; - -export type FeedbackSummary = { - __typename?: 'FeedbackSummary'; +export type FeedbackStatisticsSummaryType = { + __typename?: 'FeedbackStatisticsSummaryType'; + _id: Scalars['ID']['output']; satisfaction_average: Scalars['Float']['output']; satisfaction_max: Scalars['Int']['output']; total_responses: Scalars['Int']['output']; @@ -818,8 +805,9 @@ export type PerformanceCriteriaObjectType = CoursePageInterface & { translation_key: Scalars['String']['output']; }; -export type PresenceRecord = { - __typename?: 'PresenceRecord'; +export type PresenceRecordStatisticsType = { + __typename?: 'PresenceRecordStatisticsType'; + _id: Scalars['ID']['output']; circle_id: Scalars['ID']['output']; course_session_id: Scalars['ID']['output']; details_url: Scalars['String']['output']; @@ -940,6 +928,37 @@ export type SendFeedbackMutation = { feedback_response?: Maybe; }; +export type StatisticsCircleDataType = { + __typename?: 'StatisticsCircleDataType'; + _id: Scalars['ID']['output']; + circle_id: Scalars['ID']['output']; + circle_title: Scalars['String']['output']; + experts: Array>; +}; + +export type StatisticsCourseSessionDataType = { + __typename?: 'StatisticsCourseSessionDataType'; + _id: Scalars['ID']['output']; + session_id: Scalars['ID']['output']; + session_title: Scalars['String']['output']; +}; + +export type StatisticsCourseSessionPropertiesType = { + __typename?: 'StatisticsCourseSessionPropertiesType'; + _id: Scalars['ID']['output']; + circles: Array>; + generations: Array>; + sessions: Array>; +}; + +export type StatisticsCourseSessionsSelectionMetricType = { + __typename?: 'StatisticsCourseSessionsSelectionMetricType'; + _id: Scalars['ID']['output']; + expert_count: Scalars['Int']['output']; + participant_count: Scalars['Int']['output']; + session_count: Scalars['Int']['output']; +}; + export type TopicObjectType = CoursePageInterface & { __typename?: 'TopicObjectType'; circles: Array; @@ -1181,7 +1200,14 @@ export type DashboardProgressQueryVariables = Exact<{ }>; -export type DashboardProgressQuery = { __typename?: 'Query', course_progress?: { __typename?: 'CourseProgressType', id: string, session_to_continue_id?: string | null, competence: { __typename?: 'ProgressDashboardCompetenceType', _id: string, total_count: number, success_count: number, fail_count: number }, assignment: { __typename?: 'ProgressDashboardAssignmentType', _id: string, total_count: number, points_max_count: number, points_achieved_count: number } } | null }; +export type DashboardProgressQuery = { __typename?: 'Query', course_progress?: { __typename?: 'CourseProgressType', _id: string, course_id: string, session_to_continue_id?: string | null, competence: { __typename?: 'ProgressDashboardCompetenceType', _id: string, total_count: number, success_count: number, fail_count: number }, assignment: { __typename?: 'ProgressDashboardAssignmentType', _id: string, total_count: number, points_max_count: number, points_achieved_count: number } } | null }; + +export type CourseStatisticsQueryVariables = Exact<{ + course_id: Scalars['ID']['input']; +}>; + + +export type CourseStatisticsQuery = { __typename?: 'Query', course_statistics?: { __typename?: 'CourseStatisticsType', _id: string, course_id: string, course_title: string, course_slug: string, course_session_selection_ids: Array, course_session_properties: { __typename?: 'StatisticsCourseSessionPropertiesType', _id: string, generations: Array, sessions: Array<{ __typename?: 'StatisticsCourseSessionDataType', _id: string, session_id: string, session_title: string } | null>, circles: Array<{ __typename?: 'StatisticsCircleDataType', _id: string, circle_id: string, circle_title: string, experts: Array } | null> }, course_session_selection_metrics: { __typename?: 'StatisticsCourseSessionsSelectionMetricType', _id: string, session_count: number, participant_count: number, expert_count: number }, attendance_day_presences: { __typename?: 'AttendanceDayPresencesStatisticsType', _id: string, records: Array<{ __typename?: 'PresenceRecordStatisticsType', _id: string, course_session_id: string, generation: string, circle_id: string, due_date: string, participants_present: number, participants_total: number, details_url: string } | null>, summary: { __typename?: 'AttendanceSummaryStatisticsType', _id: string, days_completed: number, participants_present: number } }, feedback_responses: { __typename?: 'FeedbackStatisticsResponsesType', _id: string, records: Array<{ __typename?: 'FeedbackStatisticsRecordType', _id: string, course_session_id: string, generation: string, circle_id: string, satisfaction_average: number, satisfaction_max: number, details_url: string } | null>, summary: { __typename?: 'FeedbackStatisticsSummaryType', _id: string, satisfaction_average: number, satisfaction_max: number, total_responses: number } }, assignments: { __typename?: 'AssignmentsStatisticsType', _id: string, summary: { __typename?: 'AssignmentStatisticsSummaryType', _id: string, completed_count: number, average_passed: number }, records: Array<{ __typename?: 'AssignmentStatisticsRecordType', _id: string, course_session_id: string, course_session_assignment_id: string, circle_id: string, generation: string, assignment_title: string, assignment_type_translation_key: string, details_url: string, deadline: string, metrics: { __typename?: 'AssignmentCompletionMetricsType', _id: string, passed_count: number, failed_count: number, unranked_count: number, ranking_completed: boolean, average_passed: number } } | null> }, competences: { __typename?: 'CompetencesStatisticsType', _id: string, summary: { __typename?: 'CompetencePerformanceStatisticsSummaryType', _id: string, success_total: number, fail_total: number }, performances: Array<{ __typename?: 'CompetencePerformanceStatisticsType', _id: string, course_session_id: string, generation: string, circle_id: string, success_count: number, fail_count: number, details_url: string } | null> } } | null }; export type SendFeedbackMutationMutationVariables = Exact<{ courseSessionId: Scalars['ID']['input']; @@ -1202,5 +1228,6 @@ export const CompetenceCertificateQueryDocument = {"kind":"Document","definition 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 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":"title"}},{"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":"Field","name":{"kind":"Name","value":"content_url"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"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":"has_extended_time_test"}},{"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":"LearningContentRichTextObjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"text"}}]}}]}}]}}]}}]}}]}}]}}]}}]}},{"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 DashboardConfigDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"dashboardConfig"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"dashboard_config"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"dashboard_type"}}]}}]}}]} as unknown as DocumentNode; -export const DashboardProgressDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"dashboardProgress"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"course_progress"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"course_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"session_to_continue_id"}},{"kind":"Field","name":{"kind":"Name","value":"competence"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"total_count"}},{"kind":"Field","name":{"kind":"Name","value":"success_count"}},{"kind":"Field","name":{"kind":"Name","value":"fail_count"}}]}},{"kind":"Field","name":{"kind":"Name","value":"assignment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"total_count"}},{"kind":"Field","name":{"kind":"Name","value":"points_max_count"}},{"kind":"Field","name":{"kind":"Name","value":"points_achieved_count"}}]}}]}}]}}]} as unknown as DocumentNode; +export const DashboardProgressDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"dashboardProgress"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"courseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"course_progress"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"course_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"courseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"course_id"}},{"kind":"Field","name":{"kind":"Name","value":"session_to_continue_id"}},{"kind":"Field","name":{"kind":"Name","value":"competence"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"total_count"}},{"kind":"Field","name":{"kind":"Name","value":"success_count"}},{"kind":"Field","name":{"kind":"Name","value":"fail_count"}}]}},{"kind":"Field","name":{"kind":"Name","value":"assignment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"total_count"}},{"kind":"Field","name":{"kind":"Name","value":"points_max_count"}},{"kind":"Field","name":{"kind":"Name","value":"points_achieved_count"}}]}}]}}]}}]} as unknown as DocumentNode; +export const CourseStatisticsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"courseStatistics"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"course_id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"course_statistics"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"course_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"course_id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"course_id"}},{"kind":"Field","name":{"kind":"Name","value":"course_title"}},{"kind":"Field","name":{"kind":"Name","value":"course_slug"}},{"kind":"Field","name":{"kind":"Name","value":"course_session_properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"sessions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"session_id"}},{"kind":"Field","name":{"kind":"Name","value":"session_title"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generations"}},{"kind":"Field","name":{"kind":"Name","value":"circles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"circle_id"}},{"kind":"Field","name":{"kind":"Name","value":"circle_title"}},{"kind":"Field","name":{"kind":"Name","value":"experts"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"course_session_selection_ids"}},{"kind":"Field","name":{"kind":"Name","value":"course_session_selection_metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"session_count"}},{"kind":"Field","name":{"kind":"Name","value":"participant_count"}},{"kind":"Field","name":{"kind":"Name","value":"expert_count"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attendance_day_presences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"records"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"course_session_id"}},{"kind":"Field","name":{"kind":"Name","value":"generation"}},{"kind":"Field","name":{"kind":"Name","value":"circle_id"}},{"kind":"Field","name":{"kind":"Name","value":"due_date"}},{"kind":"Field","name":{"kind":"Name","value":"participants_present"}},{"kind":"Field","name":{"kind":"Name","value":"participants_total"}},{"kind":"Field","name":{"kind":"Name","value":"details_url"}}]}},{"kind":"Field","name":{"kind":"Name","value":"summary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"days_completed"}},{"kind":"Field","name":{"kind":"Name","value":"participants_present"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"feedback_responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"records"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"course_session_id"}},{"kind":"Field","name":{"kind":"Name","value":"generation"}},{"kind":"Field","name":{"kind":"Name","value":"circle_id"}},{"kind":"Field","name":{"kind":"Name","value":"satisfaction_average"}},{"kind":"Field","name":{"kind":"Name","value":"satisfaction_max"}},{"kind":"Field","name":{"kind":"Name","value":"details_url"}}]}},{"kind":"Field","name":{"kind":"Name","value":"summary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"satisfaction_average"}},{"kind":"Field","name":{"kind":"Name","value":"satisfaction_max"}},{"kind":"Field","name":{"kind":"Name","value":"total_responses"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"assignments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"summary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"completed_count"}},{"kind":"Field","name":{"kind":"Name","value":"average_passed"}}]}},{"kind":"Field","name":{"kind":"Name","value":"records"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"course_session_id"}},{"kind":"Field","name":{"kind":"Name","value":"course_session_assignment_id"}},{"kind":"Field","name":{"kind":"Name","value":"circle_id"}},{"kind":"Field","name":{"kind":"Name","value":"generation"}},{"kind":"Field","name":{"kind":"Name","value":"assignment_title"}},{"kind":"Field","name":{"kind":"Name","value":"assignment_type_translation_key"}},{"kind":"Field","name":{"kind":"Name","value":"details_url"}},{"kind":"Field","name":{"kind":"Name","value":"deadline"}},{"kind":"Field","name":{"kind":"Name","value":"metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"passed_count"}},{"kind":"Field","name":{"kind":"Name","value":"failed_count"}},{"kind":"Field","name":{"kind":"Name","value":"unranked_count"}},{"kind":"Field","name":{"kind":"Name","value":"ranking_completed"}},{"kind":"Field","name":{"kind":"Name","value":"average_passed"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"competences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"summary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"success_total"}},{"kind":"Field","name":{"kind":"Name","value":"fail_total"}}]}},{"kind":"Field","name":{"kind":"Name","value":"performances"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"course_session_id"}},{"kind":"Field","name":{"kind":"Name","value":"generation"}},{"kind":"Field","name":{"kind":"Name","value":"circle_id"}},{"kind":"Field","name":{"kind":"Name","value":"success_count"}},{"kind":"Field","name":{"kind":"Name","value":"fail_count"}},{"kind":"Field","name":{"kind":"Name","value":"details_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 84637984..c5b796dd 100644 --- a/client/src/gql/schema.graphql +++ b/client/src/gql/schema.graphql @@ -23,47 +23,54 @@ type Query { } type CourseStatisticsType { - id: ID! + _id: ID! + course_id: ID! course_title: String! course_slug: String! - course_session_properties: CourseSessionProperties! + course_session_properties: StatisticsCourseSessionPropertiesType! course_session_selection_ids: [ID]! - course_session_selection_metrics: CourseSessionsSelectionMetrics! - attendance_day_presences: AttendanceDayPresences! - feedback_responses: FeedbackResponses! - assignments: Assignments! - competences: Competences! + course_session_selection_metrics: StatisticsCourseSessionsSelectionMetricType! + attendance_day_presences: AttendanceDayPresencesStatisticsType! + feedback_responses: FeedbackStatisticsResponsesType! + assignments: AssignmentsStatisticsType! + competences: CompetencesStatisticsType! } -type CourseSessionProperties { - sessions: [CourseSessionData]! +type StatisticsCourseSessionPropertiesType { + _id: ID! + sessions: [StatisticsCourseSessionDataType]! generations: [String]! - circles: [CircleData]! + circles: [StatisticsCircleDataType]! } -type CourseSessionData { +type StatisticsCourseSessionDataType { + _id: ID! session_id: ID! session_title: String! } -type CircleData { +type StatisticsCircleDataType { + _id: ID! circle_id: ID! circle_title: String! experts: [String]! } -type CourseSessionsSelectionMetrics { +type StatisticsCourseSessionsSelectionMetricType { + _id: ID! session_count: Int! participant_count: Int! expert_count: Int! } -type AttendanceDayPresences { - records: [PresenceRecord]! - summary: AttendanceSummary! +type AttendanceDayPresencesStatisticsType { + _id: ID! + records: [PresenceRecordStatisticsType]! + summary: AttendanceSummaryStatisticsType! } -type PresenceRecord { +type PresenceRecordStatisticsType { + _id: ID! course_session_id: ID! generation: String! circle_id: ID! @@ -73,17 +80,20 @@ type PresenceRecord { details_url: String! } -type AttendanceSummary { +type AttendanceSummaryStatisticsType { + _id: ID! days_completed: Int! participants_present: Int! } -type FeedbackResponses { - records: [FeedbackRecord]! - summary: FeedbackSummary! +type FeedbackStatisticsResponsesType { + _id: ID! + records: [FeedbackStatisticsRecordType]! + summary: FeedbackStatisticsSummaryType! } -type FeedbackRecord { +type FeedbackStatisticsRecordType { + _id: ID! course_session_id: ID! generation: String! circle_id: ID! @@ -92,18 +102,21 @@ type FeedbackRecord { details_url: String! } -type FeedbackSummary { +type FeedbackStatisticsSummaryType { + _id: ID! satisfaction_average: Float! satisfaction_max: Int! total_responses: Int! } -type Assignments { - records: [AssignmentRecord]! - summary: AssignmentSummary! +type AssignmentsStatisticsType { + _id: ID! + records: [AssignmentStatisticsRecordType]! + summary: AssignmentStatisticsSummaryType! } -type AssignmentRecord { +type AssignmentStatisticsRecordType { + _id: ID! course_session_id: ID! course_session_assignment_id: ID! circle_id: ID! @@ -111,7 +124,7 @@ type AssignmentRecord { assignment_type_translation_key: String! assignment_title: String! deadline: DateTime! - metrics: AssignmentCompletionMetrics! + metrics: AssignmentCompletionMetricsType! details_url: String! } @@ -122,7 +135,8 @@ value as specified by """ scalar DateTime -type AssignmentCompletionMetrics { +type AssignmentCompletionMetricsType { + _id: ID! passed_count: Int! failed_count: Int! unranked_count: Int! @@ -130,17 +144,26 @@ type AssignmentCompletionMetrics { average_passed: Float! } -type AssignmentSummary { +type AssignmentStatisticsSummaryType { + _id: ID! completed_count: Int! average_passed: Float! } -type Competences { - performances: [CompetencePerformance]! - summary: CompletionSummary! +type CompetencesStatisticsType { + _id: ID! + summary: CompetencePerformanceStatisticsSummaryType! + performances: [CompetencePerformanceStatisticsType]! } -type CompetencePerformance { +type CompetencePerformanceStatisticsSummaryType { + _id: ID! + success_total: Int! + fail_total: Int! +} + +type CompetencePerformanceStatisticsType { + _id: ID! course_session_id: ID! generation: String! circle_id: ID! @@ -149,13 +172,9 @@ type CompetencePerformance { details_url: String! } -type CompletionSummary { - success_total: Int! - fail_total: Int! -} - type CourseProgressType { - id: ID! + _id: ID! + course_id: ID! session_to_continue_id: ID competence: ProgressDashboardCompetenceType! assignment: ProgressDashboardAssignmentType! diff --git a/client/src/gql/typenames.ts b/client/src/gql/typenames.ts index 82a85add..50e60438 100644 --- a/client/src/gql/typenames.ts +++ b/client/src/gql/typenames.ts @@ -1,29 +1,28 @@ export const ActionCompetenceObjectType = "ActionCompetenceObjectType"; export const AssignmentAssignmentAssignmentTypeChoices = "AssignmentAssignmentAssignmentTypeChoices"; export const AssignmentAssignmentCompletionCompletionStatusChoices = "AssignmentAssignmentCompletionCompletionStatusChoices"; -export const AssignmentCompletionMetrics = "AssignmentCompletionMetrics"; +export const AssignmentCompletionMetricsType = "AssignmentCompletionMetricsType"; export const AssignmentCompletionMutation = "AssignmentCompletionMutation"; export const AssignmentCompletionObjectType = "AssignmentCompletionObjectType"; export const AssignmentCompletionStatus = "AssignmentCompletionStatus"; export const AssignmentObjectType = "AssignmentObjectType"; -export const AssignmentRecord = "AssignmentRecord"; -export const AssignmentSummary = "AssignmentSummary"; -export const Assignments = "Assignments"; +export const AssignmentStatisticsRecordType = "AssignmentStatisticsRecordType"; +export const AssignmentStatisticsSummaryType = "AssignmentStatisticsSummaryType"; +export const AssignmentsStatisticsType = "AssignmentsStatisticsType"; export const AttendanceCourseUserMutation = "AttendanceCourseUserMutation"; -export const AttendanceDayPresences = "AttendanceDayPresences"; -export const AttendanceSummary = "AttendanceSummary"; +export const AttendanceDayPresencesStatisticsType = "AttendanceDayPresencesStatisticsType"; +export const AttendanceSummaryStatisticsType = "AttendanceSummaryStatisticsType"; export const AttendanceUserInputType = "AttendanceUserInputType"; export const AttendanceUserObjectType = "AttendanceUserObjectType"; export const AttendanceUserStatus = "AttendanceUserStatus"; export const Boolean = "Boolean"; -export const CircleData = "CircleData"; export const CircleLightObjectType = "CircleLightObjectType"; export const CircleObjectType = "CircleObjectType"; export const CompetenceCertificateListObjectType = "CompetenceCertificateListObjectType"; export const CompetenceCertificateObjectType = "CompetenceCertificateObjectType"; -export const CompetencePerformance = "CompetencePerformance"; -export const Competences = "Competences"; -export const CompletionSummary = "CompletionSummary"; +export const CompetencePerformanceStatisticsSummaryType = "CompetencePerformanceStatisticsSummaryType"; +export const CompetencePerformanceStatisticsType = "CompetencePerformanceStatisticsType"; +export const CompetencesStatisticsType = "CompetencesStatisticsType"; export const CoreUserLanguageChoices = "CoreUserLanguageChoices"; export const CourseCourseSessionUserRoleChoices = "CourseCourseSessionUserRoleChoices"; export const CourseObjectType = "CourseObjectType"; @@ -31,13 +30,10 @@ export const CoursePageInterface = "CoursePageInterface"; export const CourseProgressType = "CourseProgressType"; export const CourseSessionAssignmentObjectType = "CourseSessionAssignmentObjectType"; export const CourseSessionAttendanceCourseObjectType = "CourseSessionAttendanceCourseObjectType"; -export const CourseSessionData = "CourseSessionData"; export const CourseSessionEdoniqTestObjectType = "CourseSessionEdoniqTestObjectType"; export const CourseSessionObjectType = "CourseSessionObjectType"; -export const CourseSessionProperties = "CourseSessionProperties"; export const CourseSessionUserExpertCircleType = "CourseSessionUserExpertCircleType"; export const CourseSessionUserObjectsType = "CourseSessionUserObjectsType"; -export const CourseSessionsSelectionMetrics = "CourseSessionsSelectionMetrics"; export const CourseStatisticsType = "CourseStatisticsType"; export const DashboardConfigType = "DashboardConfigType"; export const DashboardType = "DashboardType"; @@ -45,10 +41,10 @@ export const Date = "Date"; export const DateTime = "DateTime"; export const DueDateObjectType = "DueDateObjectType"; export const ErrorType = "ErrorType"; -export const FeedbackRecord = "FeedbackRecord"; export const FeedbackResponseObjectType = "FeedbackResponseObjectType"; -export const FeedbackResponses = "FeedbackResponses"; -export const FeedbackSummary = "FeedbackSummary"; +export const FeedbackStatisticsRecordType = "FeedbackStatisticsRecordType"; +export const FeedbackStatisticsResponsesType = "FeedbackStatisticsResponsesType"; +export const FeedbackStatisticsSummaryType = "FeedbackStatisticsSummaryType"; export const Float = "Float"; export const GenericScalar = "GenericScalar"; export const ID = "ID"; @@ -72,11 +68,15 @@ export const LearningUnitObjectType = "LearningUnitObjectType"; export const LearnpathLearningContentAssignmentAssignmentTypeChoices = "LearnpathLearningContentAssignmentAssignmentTypeChoices"; export const Mutation = "Mutation"; export const PerformanceCriteriaObjectType = "PerformanceCriteriaObjectType"; -export const PresenceRecord = "PresenceRecord"; +export const PresenceRecordStatisticsType = "PresenceRecordStatisticsType"; export const ProgressDashboardAssignmentType = "ProgressDashboardAssignmentType"; export const ProgressDashboardCompetenceType = "ProgressDashboardCompetenceType"; export const Query = "Query"; export const SendFeedbackMutation = "SendFeedbackMutation"; +export const StatisticsCircleDataType = "StatisticsCircleDataType"; +export const StatisticsCourseSessionDataType = "StatisticsCourseSessionDataType"; +export const StatisticsCourseSessionPropertiesType = "StatisticsCourseSessionPropertiesType"; +export const StatisticsCourseSessionsSelectionMetricType = "StatisticsCourseSessionsSelectionMetricType"; export const String = "String"; export const TopicObjectType = "TopicObjectType"; export const UUID = "UUID"; diff --git a/client/src/graphql/queries.ts b/client/src/graphql/queries.ts index a8ad980c..2b98ab23 100644 --- a/client/src/graphql/queries.ts +++ b/client/src/graphql/queries.ts @@ -283,7 +283,8 @@ export const DASHBOARD_CONFIG = graphql(` export const DASHBOARD_COURSE_SESSION_PROGRESS = graphql(` query dashboardProgress($courseId: ID!) { course_progress(course_id: $courseId) { - id + _id + course_id session_to_continue_id competence { _id @@ -300,3 +301,116 @@ export const DASHBOARD_COURSE_SESSION_PROGRESS = graphql(` } } `); + +export const DASHBOARD_COURSE_STATISTICS = graphql(` + query courseStatistics($course_id: ID!) { + course_statistics(course_id: $course_id) { + _id + course_id + course_title + course_slug + course_session_properties { + _id + sessions { + _id + session_id + session_title + } + generations + circles { + _id + circle_id + circle_title + experts + } + } + course_session_selection_ids + course_session_selection_metrics { + _id + session_count + participant_count + expert_count + } + attendance_day_presences { + _id + records { + _id + course_session_id + generation + circle_id + due_date + participants_present + participants_total + details_url + } + summary { + _id + days_completed + participants_present + } + } + feedback_responses { + _id + records { + _id + course_session_id + generation + circle_id + satisfaction_average + satisfaction_max + details_url + } + summary { + _id + satisfaction_average + satisfaction_max + total_responses + } + } + assignments { + _id + summary { + _id + completed_count + average_passed + } + records { + _id + course_session_id + course_session_assignment_id + circle_id + generation + assignment_title + assignment_type_translation_key + details_url + deadline + metrics { + _id + passed_count + failed_count + unranked_count + ranking_completed + average_passed + } + } + } + competences { + _id + summary { + _id + success_total + fail_total + } + performances { + _id + course_session_id + generation + circle_id + success_count + fail_count + details_url + } + } + } + } +`); diff --git a/client/src/pages/dashboard/ProgressPage.vue b/client/src/pages/dashboard/ProgressPage.vue index 3483acf9..b7a9ff0e 100644 --- a/client/src/pages/dashboard/ProgressPage.vue +++ b/client/src/pages/dashboard/ProgressPage.vue @@ -47,66 +47,89 @@ const assignment_progress = computed(() => ({ FAIL: 0, UNKNOWN: assignment.value.points_max_count - assignment.value.points_achieved_count, })); + +const competenceCertificateUrl = computed(() => { + return `/course/${courseSlug.value}/competence/certificates?courseSessionId=${progress.value?.course_progress?.session_to_continue_id}`; +}); + +const competenceCriteriaUrl = computed(() => { + return `/course/${courseSlug.value}/competence/criteria?courseSessionId=${progress.value?.course_progress?.session_to_continue_id}`; +});