From c1f29a02a0b0f6a7671daf73a2ee4e2e8e24c55e Mon Sep 17 00:00:00 2001 From: Daniel Egger Date: Tue, 11 Jul 2023 11:08:43 +0200 Subject: [PATCH] Fix problems after rebase --- client/src/gql/graphql.ts | 325 +++++++++--------- client/src/gql/schema.graphql | 22 +- client/src/gql/typenames.ts | 5 + .../course/creators/test_course.py | 1 + .../migrations/0007_merge_20230711_1108.py | 14 + .../migrations/0004_merge_20230711_1108.py | 14 + .../migrations/0010_merge_20230711_1108.py | 14 + 7 files changed, 228 insertions(+), 167 deletions(-) create mode 100644 server/vbv_lernwelt/course/migrations/0007_merge_20230711_1108.py create mode 100644 server/vbv_lernwelt/course_session/migrations/0004_merge_20230711_1108.py create mode 100644 server/vbv_lernwelt/learnpath/migrations/0010_merge_20230711_1108.py diff --git a/client/src/gql/graphql.ts b/client/src/gql/graphql.ts index 5fdafc40..4f4a6d63 100644 --- a/client/src/gql/graphql.ts +++ b/client/src/gql/graphql.ts @@ -5,100 +5,107 @@ export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } /** * The `DateTime` scalar type represents a DateTime * value as specified by * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). */ - DateTime: any; + DateTime: { input: any; output: any; } /** * The `GenericScalar` scalar type represents a generic * GraphQL scalar value that could be: * String, Boolean, Int, Float, List or Object. */ - GenericScalar: any; - JSONStreamField: any; + GenericScalar: { input: any; output: any; } + JSONStreamField: { input: any; output: any; } /** * 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). */ - JSONString: any; + JSONString: { input: any; output: any; } }; /** An enumeration. */ -export enum AssignmentAssignmentAssignmentTypeChoices { +export type AssignmentAssignmentAssignmentTypeChoices = /** CASEWORK */ - Casework = 'CASEWORK', + | 'CASEWORK' /** PREP_ASSIGNMENT */ - PrepAssignment = 'PREP_ASSIGNMENT', + | 'PREP_ASSIGNMENT' /** REFLECTION */ - Reflection = 'REFLECTION' -} + | 'REFLECTION'; /** An enumeration. */ -export enum AssignmentAssignmentCompletionCompletionStatusChoices { +export type AssignmentAssignmentCompletionCompletionStatusChoices = /** EVALUATION_IN_PROGRESS */ - EvaluationInProgress = 'EVALUATION_IN_PROGRESS', + | 'EVALUATION_IN_PROGRESS' /** EVALUATION_SUBMITTED */ - EvaluationSubmitted = 'EVALUATION_SUBMITTED', + | 'EVALUATION_SUBMITTED' /** IN_PROGRESS */ - InProgress = 'IN_PROGRESS', + | 'IN_PROGRESS' /** SUBMITTED */ - Submitted = 'SUBMITTED' -} + | 'SUBMITTED'; export type AssignmentCompletionMutation = { __typename?: 'AssignmentCompletionMutation'; - assignment_completion?: Maybe; + assignment_completion?: Maybe; }; -export type AssignmentCompletionType = { - __typename?: 'AssignmentCompletionType'; - additional_json_data: Scalars['JSONString']; - assignment: AssignmentType; +export type AssignmentCompletionObjectType = { + __typename?: 'AssignmentCompletionObjectType'; + additional_json_data: Scalars['JSONString']['output']; + assignment: AssignmentObjectType; assignment_user: UserType; - completion_data?: Maybe; + completion_data?: Maybe; completion_status: AssignmentAssignmentCompletionCompletionStatusChoices; - created_at: Scalars['DateTime']; - evaluation_grade?: Maybe; - evaluation_points?: Maybe; - evaluation_submitted_at?: Maybe; + created_at: Scalars['DateTime']['output']; + evaluation_grade?: Maybe; + evaluation_points?: Maybe; + evaluation_submitted_at?: Maybe; evaluation_user?: Maybe; - id: Scalars['ID']; - submitted_at?: Maybe; - updated_at: Scalars['DateTime']; + id: Scalars['ID']['output']; + submitted_at?: Maybe; + updated_at: Scalars['DateTime']['output']; }; -export type AssignmentType = CoursePageInterface & { - __typename?: 'AssignmentType'; +/** An enumeration. */ +export type AssignmentCompletionStatus = + | 'EVALUATION_IN_PROGRESS' + | 'EVALUATION_SUBMITTED' + | 'IN_PROGRESS' + | 'SUBMITTED'; + +export type AssignmentObjectType = CoursePageInterface & { + __typename?: 'AssignmentObjectType'; assignment_type: AssignmentAssignmentAssignmentTypeChoices; - content_type?: Maybe; + content_type?: Maybe; /** Zeitaufwand als Text */ - effort_required: Scalars['String']; + effort_required: Scalars['String']['output']; /** Beschreibung der Bewertung */ - evaluation_description: Scalars['String']; + evaluation_description: Scalars['String']['output']; /** URL zum Beurteilungsinstrument */ - evaluation_document_url: Scalars['String']; - evaluation_tasks?: Maybe; - frontend_url?: Maybe; - id?: Maybe; + evaluation_document_url: Scalars['String']['output']; + evaluation_tasks?: Maybe; + frontend_url?: Maybe; + id?: Maybe; /** Erläuterung der Ausgangslage */ - intro_text: Scalars['String']; - live?: Maybe; - performance_objectives?: Maybe; - slug?: Maybe; - tasks?: Maybe; - title?: Maybe; - translation_key?: Maybe; + intro_text: Scalars['String']['output']; + live?: Maybe; + performance_objectives?: Maybe; + slug?: Maybe; + tasks?: Maybe; + title?: Maybe; + translation_key?: Maybe; }; export type AttendanceCourseUserMutation = { @@ -108,111 +115,109 @@ export type AttendanceCourseUserMutation = { export type AttendanceUserInputType = { status: AttendanceUserStatus; - user_id: Scalars['ID']; + user_id: Scalars['ID']['input']; }; /** An enumeration. */ -export enum AttendanceUserStatus { - Absent = 'ABSENT', - Present = 'PRESENT' -} +export type AttendanceUserStatus = + | 'ABSENT' + | 'PRESENT'; export type AttendanceUserType = { __typename?: 'AttendanceUserType'; - email?: Maybe; - first_name?: Maybe; - last_name?: Maybe; + email?: Maybe; + first_name?: Maybe; + last_name?: Maybe; status: AttendanceUserStatus; - user_id: Scalars['ID']; + user_id: Scalars['ID']['output']; }; /** An enumeration. */ -export enum CoreUserLanguageChoices { +export type CoreUserLanguageChoices = /** Deutsch */ - De = 'DE', + | 'DE' /** Français */ - Fr = 'FR', + | 'FR' /** Italiano */ - It = 'IT' -} + | 'IT'; export type CoursePageInterface = { - content_type?: Maybe; - frontend_url?: Maybe; - id?: Maybe; - live?: Maybe; - slug?: Maybe; - title?: Maybe; - translation_key?: Maybe; + content_type?: Maybe; + frontend_url?: Maybe; + id?: Maybe; + live?: Maybe; + slug?: Maybe; + title?: Maybe; + translation_key?: Maybe; }; export type CourseSessionAttendanceCourseType = { __typename?: 'CourseSessionAttendanceCourseType'; attendance_user_list?: Maybe>>; - course_session_id?: Maybe; - due_date_id?: Maybe; - end?: Maybe; - id: Scalars['ID']; - learning_content_id?: Maybe; - location: Scalars['String']; - start?: Maybe; - trainer: Scalars['String']; + course_session_id?: Maybe; + due_date_id?: Maybe; + end?: Maybe; + id: Scalars['ID']['output']; + learning_content_id?: Maybe; + location: Scalars['String']['output']; + start?: Maybe; + trainer: Scalars['String']['output']; }; export type CourseType = { __typename?: 'CourseType'; - category_name: Scalars['String']; - id: Scalars['ID']; + category_name: Scalars['String']['output']; + id: Scalars['ID']['output']; learning_path?: Maybe; - slug: Scalars['String']; - title: Scalars['String']; + slug: Scalars['String']['output']; + title: Scalars['String']['output']; }; export type ErrorType = { __typename?: 'ErrorType'; - field: Scalars['String']; - messages: Array; + field: Scalars['String']['output']; + messages: Array; }; export type FeedbackResponse = Node & { __typename?: 'FeedbackResponse'; - created_at: Scalars['DateTime']; - data?: Maybe; + created_at: Scalars['DateTime']['output']; + data?: Maybe; /** The ID of the object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type LearningPathType = CoursePageInterface & { __typename?: 'LearningPathType'; - content_type?: Maybe; - depth: Scalars['Int']; - draft_title: Scalars['String']; - expire_at?: Maybe; - expired: Scalars['Boolean']; - first_published_at?: Maybe; - frontend_url?: Maybe; - go_live_at?: Maybe; - has_unpublished_changes: Scalars['Boolean']; - id?: Maybe; - last_published_at?: Maybe; - latest_revision_created_at?: Maybe; - live?: Maybe; - locked: Scalars['Boolean']; - locked_at?: Maybe; + content_type?: Maybe; + depth: Scalars['Int']['output']; + draft_title: Scalars['String']['output']; + expire_at?: Maybe; + expired: Scalars['Boolean']['output']; + first_published_at?: Maybe; + frontend_url?: Maybe; + go_live_at?: Maybe; + has_unpublished_changes: Scalars['Boolean']['output']; + id?: Maybe; + last_published_at?: Maybe; + latest_revision_created_at?: Maybe; + live?: Maybe; + locked: Scalars['Boolean']['output']; + locked_at?: Maybe; locked_by?: Maybe; - numchild: Scalars['Int']; + numchild: Scalars['Int']['output']; owner?: Maybe; - path: Scalars['String']; + path: Scalars['String']['output']; /** Die informative Beschreibung, dargestellt in Suchmaschinen-Ergebnissen unter der Überschrift. */ - search_description: Scalars['String']; + search_description: Scalars['String']['output']; /** Der Titel der Seite, dargestellt in Suchmaschinen-Ergebnissen als die verlinkte Überschrift. */ - seo_title: Scalars['String']; + seo_title: Scalars['String']['output']; /** Ob ein Link zu dieser Seite in automatisch generierten Menüs auftaucht. */ - show_in_menus: Scalars['Boolean']; - slug?: Maybe; - title?: Maybe; - translation_key?: Maybe; - url_path: Scalars['String']; + show_in_menus: Scalars['Boolean']['output']; + slug?: Maybe; + title?: Maybe; + translation_key?: Maybe; + url_path: Scalars['String']['output']; }; export type Mutation = { @@ -223,75 +228,75 @@ export type Mutation = { }; -export type MutationSend_FeedbackArgs = { +export type MutationSendFeedbackArgs = { input: SendFeedbackInput; }; -export type MutationUpdate_Course_Session_Attendance_Course_UsersArgs = { +export type MutationUpdateCourseSessionAttendanceCourseUsersArgs = { attendance_user_list: Array>; - id: Scalars['ID']; + id: Scalars['ID']['input']; }; -export type MutationUpsert_Assignment_CompletionArgs = { - assignment_id: Scalars['ID']; - assignment_user_id?: InputMaybe; - completion_data_string?: InputMaybe; - completion_status?: InputMaybe; - course_session_id: Scalars['ID']; - evaluation_grade?: InputMaybe; - evaluation_points?: InputMaybe; +export type MutationUpsertAssignmentCompletionArgs = { + assignment_id: Scalars['ID']['input']; + assignment_user_id?: InputMaybe; + completion_data_string?: InputMaybe; + completion_status?: InputMaybe; + course_session_id: Scalars['ID']['input']; + evaluation_grade?: InputMaybe; + evaluation_points?: InputMaybe; }; /** An object with an ID */ export type Node = { /** The ID of the object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type Query = { __typename?: 'Query'; - assignment?: Maybe; - assignment_completion?: Maybe; + assignment?: Maybe; + assignment_completion?: Maybe; course?: Maybe; course_session_attendance_course?: Maybe; }; export type QueryAssignmentArgs = { - id?: InputMaybe; - slug?: InputMaybe; + id?: InputMaybe; + slug?: InputMaybe; }; -export type QueryAssignment_CompletionArgs = { - assignment_id: Scalars['ID']; - assignment_user_id?: InputMaybe; - course_session_id: Scalars['ID']; +export type QueryAssignmentCompletionArgs = { + assignment_id: Scalars['ID']['input']; + assignment_user_id?: InputMaybe; + course_session_id: Scalars['ID']['input']; }; export type QueryCourseArgs = { - id?: InputMaybe; + id?: InputMaybe; }; -export type QueryCourse_Session_Attendance_CourseArgs = { - assignment_user_id?: InputMaybe; - id: Scalars['ID']; +export type QueryCourseSessionAttendanceCourseArgs = { + assignment_user_id?: InputMaybe; + id: Scalars['ID']['input']; }; export type SendFeedbackInput = { - clientMutationId?: InputMaybe; - course_session: Scalars['Int']; - data?: InputMaybe; - page: Scalars['String']; + clientMutationId?: InputMaybe; + course_session: Scalars['Int']['input']; + data?: InputMaybe; + page: Scalars['String']['input']; }; export type SendFeedbackPayload = { __typename?: 'SendFeedbackPayload'; - clientMutationId?: Maybe; + clientMutationId?: Maybe; /** May contain more than one error for same field. */ errors?: Maybe>>; feedback_response?: Maybe; @@ -299,14 +304,14 @@ export type SendFeedbackPayload = { export type UserType = { __typename?: 'UserType'; - avatar_url: Scalars['String']; - email: Scalars['String']; - first_name: Scalars['String']; - id: Scalars['ID']; + avatar_url: Scalars['String']['output']; + email: Scalars['String']['output']; + first_name: Scalars['String']['output']; + id: Scalars['ID']['output']; language: CoreUserLanguageChoices; - last_name: Scalars['String']; + last_name: Scalars['String']['output']; /** Erforderlich. 150 Zeichen oder weniger. Nur Buchstaben, Ziffern und @/./+/-/_. */ - username: Scalars['String']; + username: Scalars['String']['output']; }; export type SendFeedbackMutationMutationVariables = Exact<{ @@ -317,29 +322,29 @@ export type SendFeedbackMutationMutationVariables = Exact<{ export type SendFeedbackMutationMutation = { __typename?: 'Mutation', send_feedback?: { __typename?: 'SendFeedbackPayload', feedback_response?: { __typename?: 'FeedbackResponse', id: string } | null, errors?: Array<{ __typename?: 'ErrorType', field: string, messages: Array } | null> | null } | null }; export type UpsertAssignmentCompletionMutationVariables = Exact<{ - assignmentId: Scalars['ID']; - courseSessionId: Scalars['ID']; - assignmentUserId?: InputMaybe; - completionStatus: Scalars['String']; - completionDataString: Scalars['String']; - evaluationGrade?: InputMaybe; - evaluationPoints?: InputMaybe; + assignmentId: Scalars['ID']['input']; + courseSessionId: Scalars['ID']['input']; + assignmentUserId?: InputMaybe; + completionStatus: AssignmentCompletionStatus; + completionDataString: Scalars['String']['input']; + evaluationGrade?: InputMaybe; + evaluationPoints?: InputMaybe; }>; -export type UpsertAssignmentCompletionMutation = { __typename?: 'Mutation', upsert_assignment_completion?: { __typename?: 'AssignmentCompletionMutation', assignment_completion?: { __typename?: 'AssignmentCompletionType', id: string, completion_status: AssignmentAssignmentCompletionCompletionStatusChoices, submitted_at?: any | null, evaluation_submitted_at?: any | null, evaluation_grade?: number | null, evaluation_points?: number | null, completion_data?: any | null } | null } | null }; +export type UpsertAssignmentCompletionMutation = { __typename?: 'Mutation', upsert_assignment_completion?: { __typename?: 'AssignmentCompletionMutation', assignment_completion?: { __typename?: 'AssignmentCompletionObjectType', id: string, completion_status: AssignmentAssignmentCompletionCompletionStatusChoices, submitted_at?: any | null, evaluation_submitted_at?: any | null, evaluation_grade?: number | null, evaluation_points?: number | null, completion_data?: any | null } | null } | null }; export type AssignmentCompletionQueryQueryVariables = Exact<{ - assignmentId: Scalars['ID']; - courseSessionId: Scalars['ID']; - assignmentUserId?: InputMaybe; + assignmentId: Scalars['ID']['input']; + courseSessionId: Scalars['ID']['input']; + assignmentUserId?: InputMaybe; }>; -export type AssignmentCompletionQueryQuery = { __typename?: 'Query', assignment?: { __typename?: 'AssignmentType', assignment_type: AssignmentAssignmentAssignmentTypeChoices, content_type?: string | null, effort_required: string, evaluation_description: string, evaluation_document_url: string, evaluation_tasks?: any | null, id?: string | null, intro_text: string, performance_objectives?: any | null, slug?: string | null, tasks?: any | null, title?: string | null, translation_key?: string | null } | null, assignment_completion?: { __typename?: 'AssignmentCompletionType', id: string, completion_status: AssignmentAssignmentCompletionCompletionStatusChoices, submitted_at?: any | null, evaluation_submitted_at?: any | null, evaluation_grade?: number | null, evaluation_points?: number | null, completion_data?: any | null, evaluation_user?: { __typename?: 'UserType', id: string } | null, assignment_user: { __typename?: 'UserType', id: string } } | null }; +export type AssignmentCompletionQueryQuery = { __typename?: 'Query', assignment?: { __typename?: 'AssignmentObjectType', assignment_type: AssignmentAssignmentAssignmentTypeChoices, content_type?: string | null, effort_required: string, evaluation_description: string, evaluation_document_url: string, evaluation_tasks?: any | null, id?: string | null, intro_text: string, performance_objectives?: any | null, slug?: string | null, tasks?: any | null, title?: string | null, translation_key?: string | null } | null, assignment_completion?: { __typename?: 'AssignmentCompletionObjectType', id: string, completion_status: AssignmentAssignmentCompletionCompletionStatusChoices, submitted_at?: any | null, evaluation_submitted_at?: any | null, evaluation_grade?: number | null, evaluation_points?: number | null, completion_data?: any | null, evaluation_user?: { __typename?: 'UserType', id: string } | null, assignment_user: { __typename?: 'UserType', id: string } } | null }; export type CourseQueryQueryVariables = Exact<{ - courseId: Scalars['Int']; + courseId: Scalars['Int']['input']; }>; @@ -347,6 +352,6 @@ export type CourseQueryQuery = { __typename?: 'Query', course?: { __typename?: ' 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":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SendFeedbackInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"send_feedback"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"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":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"Field","name":{"kind":"Name","value":"messages"}}]}}]}}]}}]} as unknown as DocumentNode; -export const UpsertAssignmentCompletionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpsertAssignmentCompletion"},"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":"assignmentUserId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"completionStatus"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"completionDataString"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"evaluationGrade"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"evaluationPoints"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"upsert_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":"completion_status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"completionStatus"}}},{"kind":"Argument","name":{"kind":"Name","value":"completion_data_string"},"value":{"kind":"Variable","name":{"kind":"Name","value":"completionDataString"}}},{"kind":"Argument","name":{"kind":"Name","value":"evaluation_grade"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evaluationGrade"}}},{"kind":"Argument","name":{"kind":"Name","value":"evaluation_points"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evaluationPoints"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignment_completion"},"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_grade"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_points"}},{"kind":"Field","name":{"kind":"Name","value":"completion_data"}}]}}]}}]}}]} as unknown as DocumentNode; +export const UpsertAssignmentCompletionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpsertAssignmentCompletion"},"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":"assignmentUserId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"completionStatus"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AssignmentCompletionStatus"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"completionDataString"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"evaluationGrade"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"evaluationPoints"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"upsert_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":"completion_status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"completionStatus"}}},{"kind":"Argument","name":{"kind":"Name","value":"completion_data_string"},"value":{"kind":"Variable","name":{"kind":"Name","value":"completionDataString"}}},{"kind":"Argument","name":{"kind":"Name","value":"evaluation_grade"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evaluationGrade"}}},{"kind":"Argument","name":{"kind":"Name","value":"evaluation_points"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evaluationPoints"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignment_completion"},"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_grade"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_points"}},{"kind":"Field","name":{"kind":"Name","value":"completion_data"}}]}}]}}]}}]} as unknown as DocumentNode; 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":"assignmentUserId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}],"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":"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":"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"}}}],"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_grade"}},{"kind":"Field","name":{"kind":"Name","value":"evaluation_points"}},{"kind":"Field","name":{"kind":"Name","value":"completion_data"}}]}}]}}]} 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":"courseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"course"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"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":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"category_name"}},{"kind":"Field","name":{"kind":"Name","value":"learning_path"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]} 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 af82b73b..dc34a318 100644 --- a/client/src/gql/schema.graphql +++ b/client/src/gql/schema.graphql @@ -1,8 +1,8 @@ type Query { course_session_attendance_course(id: ID!, assignment_user_id: ID): CourseSessionAttendanceCourseType course(id: Int): CourseType - assignment(id: ID, slug: String): AssignmentType - assignment_completion(assignment_id: ID!, course_session_id: ID!, assignment_user_id: ID): AssignmentCompletionType + assignment(id: ID, slug: String): AssignmentObjectType + assignment_completion(assignment_id: ID!, course_session_id: ID!, assignment_user_id: ID): AssignmentCompletionObjectType } type CourseSessionAttendanceCourseType { @@ -123,7 +123,7 @@ enum CoreUserLanguageChoices { IT } -type AssignmentType implements CoursePageInterface { +type AssignmentObjectType implements CoursePageInterface { assignment_type: AssignmentAssignmentAssignmentTypeChoices! """Erläuterung der Ausgangslage""" @@ -163,7 +163,7 @@ enum AssignmentAssignmentAssignmentTypeChoices { scalar JSONStreamField -type AssignmentCompletionType { +type AssignmentCompletionObjectType { id: ID! created_at: DateTime! updated_at: DateTime! @@ -173,7 +173,7 @@ type AssignmentCompletionType { evaluation_grade: Float evaluation_points: Float assignment_user: UserType! - assignment: AssignmentType! + assignment: AssignmentObjectType! completion_status: AssignmentAssignmentCompletionCompletionStatusChoices! completion_data: GenericScalar additional_json_data: JSONString! @@ -212,7 +212,7 @@ scalar JSONString type Mutation { send_feedback(input: SendFeedbackInput!): SendFeedbackPayload update_course_session_attendance_course_users(attendance_user_list: [AttendanceUserInputType]!, id: ID!): AttendanceCourseUserMutation - upsert_assignment_completion(assignment_id: ID!, assignment_user_id: ID, completion_data_string: String, completion_status: String, course_session_id: ID!, evaluation_grade: Float, evaluation_points: Float): AssignmentCompletionMutation + upsert_assignment_completion(assignment_id: ID!, assignment_user_id: ID, completion_data_string: String, completion_status: AssignmentCompletionStatus, course_session_id: ID!, evaluation_grade: Float, evaluation_points: Float): AssignmentCompletionMutation } type SendFeedbackPayload { @@ -258,5 +258,13 @@ input AttendanceUserInputType { } type AssignmentCompletionMutation { - assignment_completion: AssignmentCompletionType + assignment_completion: AssignmentCompletionObjectType +} + +"""An enumeration.""" +enum AssignmentCompletionStatus { + IN_PROGRESS + SUBMITTED + EVALUATION_IN_PROGRESS + EVALUATION_SUBMITTED } \ No newline at end of file diff --git a/client/src/gql/typenames.ts b/client/src/gql/typenames.ts index 00c8620f..7743de82 100644 --- a/client/src/gql/typenames.ts +++ b/client/src/gql/typenames.ts @@ -4,9 +4,14 @@ export const AssignmentCompletionMutation = "AssignmentCompletionMutation"; export const AssignmentCompletionObjectType = "AssignmentCompletionObjectType"; export const AssignmentCompletionStatus = "AssignmentCompletionStatus"; export const AssignmentObjectType = "AssignmentObjectType"; +export const AttendanceCourseUserMutation = "AttendanceCourseUserMutation"; +export const AttendanceUserInputType = "AttendanceUserInputType"; +export const AttendanceUserStatus = "AttendanceUserStatus"; +export const AttendanceUserType = "AttendanceUserType"; export const Boolean = "Boolean"; export const CoreUserLanguageChoices = "CoreUserLanguageChoices"; export const CoursePageInterface = "CoursePageInterface"; +export const CourseSessionAttendanceCourseType = "CourseSessionAttendanceCourseType"; export const CourseType = "CourseType"; export const DateTime = "DateTime"; export const ErrorType = "ErrorType"; diff --git a/server/vbv_lernwelt/course/creators/test_course.py b/server/vbv_lernwelt/course/creators/test_course.py index d4ea4043..789d7e70 100644 --- a/server/vbv_lernwelt/course/creators/test_course.py +++ b/server/vbv_lernwelt/course/creators/test_course.py @@ -1,4 +1,5 @@ import json +import random from datetime import datetime, timedelta import wagtail_factories diff --git a/server/vbv_lernwelt/course/migrations/0007_merge_20230711_1108.py b/server/vbv_lernwelt/course/migrations/0007_merge_20230711_1108.py new file mode 100644 index 00000000..0e5c1726 --- /dev/null +++ b/server/vbv_lernwelt/course/migrations/0007_merge_20230711_1108.py @@ -0,0 +1,14 @@ +# Generated by Django 3.2.13 on 2023-07-11 09:08 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('course', '0006_auto_20230626_1724'), + ('course', '0006_remove_coursesession_assignment_details_list'), + ] + + operations = [ + ] diff --git a/server/vbv_lernwelt/course_session/migrations/0004_merge_20230711_1108.py b/server/vbv_lernwelt/course_session/migrations/0004_merge_20230711_1108.py new file mode 100644 index 00000000..b5786fd6 --- /dev/null +++ b/server/vbv_lernwelt/course_session/migrations/0004_merge_20230711_1108.py @@ -0,0 +1,14 @@ +# Generated by Django 3.2.13 on 2023-07-11 09:08 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('course_session', '0002_coursesessionattendancecourse_attendance_user_list'), + ('course_session', '0003_auto_20230628_1321'), + ] + + operations = [ + ] diff --git a/server/vbv_lernwelt/learnpath/migrations/0010_merge_20230711_1108.py b/server/vbv_lernwelt/learnpath/migrations/0010_merge_20230711_1108.py new file mode 100644 index 00000000..e85a13d9 --- /dev/null +++ b/server/vbv_lernwelt/learnpath/migrations/0010_merge_20230711_1108.py @@ -0,0 +1,14 @@ +# Generated by Django 3.2.13 on 2023-07-11 09:08 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('learnpath', '0008_alter_learningcontentassignment_content_assignment'), + ('learnpath', '0009_alter_learningcontentassignment_content_assignment'), + ] + + operations = [ + ]