@@ -2420,12 +2420,52 @@ export type StartQuizMutationVariables = Exact<{
24202420
24212421
24222422export type StartQuizMutation = { __typename ?: 'Mutation' , startQuiz : { __typename ?: 'QuizSubmission' , id : string , startedAt : any , expiresAt ?: any | null , isExpired : boolean , questionOrder : Array < string > , orderedQuestions : Array <
2423- | { __typename ? : 'FreeTextQuestion' , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null }
2424- | { __typename ? : 'JsonQuestion' , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null }
2425- | { __typename ? : 'NumberQuestion' , minValue ?: number | null , maxValue ?: number | null , stepValue ?: number | null , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null }
2426- | { __typename ? : 'PredefinedQuestion' , allowMultipleSelection : boolean , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null , predefinedAnswers : Array < { __typename ?: 'QuizPredefinedAnswer' , id : string , answerText : string , answerOrder : number , isCorrect ?: boolean | null } > }
2423+ | { __typename : 'FreeTextQuestion' , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null }
2424+ | { __typename : 'JsonQuestion' , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null }
2425+ | { __typename : 'NumberQuestion' , minValue ?: number | null , maxValue ?: number | null , stepValue ?: number | null , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null }
2426+ | { __typename : 'PredefinedQuestion' , allowMultipleSelection : boolean , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null , predefinedAnswers : Array < { __typename ?: 'QuizPredefinedAnswer' , id : string , answerText : string , answerOrder : number , isCorrect ?: boolean | null } > }
24272427 > , quiz : { __typename ?: 'Quiz' , id : string , name : string , timeoutSeconds ?: number | null } } } ;
24282428
2429+ export type SubmitQuizAnswerMutationVariables = Exact < {
2430+ submissionId : Scalars [ 'ID' ] [ 'input' ] ;
2431+ input : SubmitQuizAnswerInput ;
2432+ } > ;
2433+
2434+
2435+ export type SubmitQuizAnswerMutation = { __typename ?: 'Mutation' , submitQuizAnswer :
2436+ | { __typename : 'FreeTextResponse' , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null , question :
2437+ | { __typename ?: 'FreeTextQuestion' , id : string }
2438+ | { __typename ?: 'JsonQuestion' , id : string }
2439+ | { __typename ?: 'NumberQuestion' , id : string }
2440+ | { __typename ?: 'PredefinedQuestion' , id : string }
2441+ }
2442+ | { __typename : 'JsonResponse' , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null , question :
2443+ | { __typename ?: 'FreeTextQuestion' , id : string }
2444+ | { __typename ?: 'JsonQuestion' , id : string }
2445+ | { __typename ?: 'NumberQuestion' , id : string }
2446+ | { __typename ?: 'PredefinedQuestion' , id : string }
2447+ }
2448+ | { __typename : 'NumberResponse' , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null , question :
2449+ | { __typename ?: 'FreeTextQuestion' , id : string }
2450+ | { __typename ?: 'JsonQuestion' , id : string }
2451+ | { __typename ?: 'NumberQuestion' , id : string }
2452+ | { __typename ?: 'PredefinedQuestion' , id : string }
2453+ }
2454+ | { __typename : 'PredefinedResponse' , isCorrect ?: boolean | null , selectedAnswerIds : Array < string > , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null , selectedAnswers : Array < { __typename ?: 'QuizPredefinedAnswer' , id : string , answerText : string , isCorrect ?: boolean | null } > , question :
2455+ | { __typename ?: 'FreeTextQuestion' , id : string }
2456+ | { __typename ?: 'JsonQuestion' , id : string }
2457+ | { __typename ?: 'NumberQuestion' , id : string }
2458+ | { __typename ?: 'PredefinedQuestion' , id : string }
2459+ }
2460+ } ;
2461+
2462+ export type FinalizeQuizMutationVariables = Exact < {
2463+ submissionId : Scalars [ 'ID' ] [ 'input' ] ;
2464+ } > ;
2465+
2466+
2467+ export type FinalizeQuizMutation = { __typename ?: 'Mutation' , finalizeQuiz : { __typename ?: 'QuizSubmission' , id : string , completedAt ?: any | null , score ?: number | null , maxScore ?: number | null , scorePercentage ?: number | null , pointsAwarded ?: number | null } } ;
2468+
24292469export type AssignRoleMutationVariables = Exact < {
24302470 input : AssignRoleInput ;
24312471} > ;
@@ -2524,16 +2564,36 @@ export type ChallengePageQueryVariables = Exact<{
25242564
25252565export type ChallengePageQuery = { __typename ?: 'Query' , challenge :
25262566 | { __typename : 'ExternalChallenge' , url : string , id : string , name : string , description : any , userEnrolledAt ?: any | null , userCompletedAt ?: any | null }
2527- | { __typename : 'QuizChallenge' , id : string , name : string , description : any , userEnrolledAt ?: any | null , userCompletedAt ?: any | null , quiz : { __typename ?: 'Quiz' , id : string , name : string , description : string , timeoutSeconds ?: number | null , randomizeQuestions : boolean , revealCorrectAnswers : boolean , allowRetakes : boolean , completionPoints : number , publishedAt ?: any | null , endTime ?: any | null , userCanStart : boolean , userActiveSubmission ?: { __typename ?: 'QuizSubmission' , id : string } | null , userSubmissions : Array < { __typename ?: 'QuizSubmission' , id : string , startedAt : any , completedAt ?: any | null , expiresAt ?: any | null , isExpired : boolean , score ?: number | null , maxScore ?: number | null , scorePercentage ?: number | null , orderedQuestions : Array <
2567+ | { __typename : 'QuizChallenge' , id : string , name : string , description : any , userEnrolledAt ?: any | null , userCompletedAt ?: any | null , quiz : { __typename ?: 'Quiz' , id : string , name : string , description : string , timeoutSeconds ?: number | null , randomizeQuestions : boolean , revealCorrectAnswers : boolean , allowRetakes : boolean , completionPoints : number , publishedAt ?: any | null , endTime ?: any | null , userCanStart : boolean , userActiveSubmission ?: { __typename ?: 'QuizSubmission' , id : string } | null , userSubmissions : Array < { __typename ?: 'QuizSubmission' , id : string , startedAt : any , completedAt ?: any | null , expiresAt ?: any | null , isExpired : boolean , score ?: number | null , maxScore ?: number | null , scorePercentage ?: number | null , pointsAwarded ?: number | null , orderedQuestions : Array <
25282568 | { __typename : 'FreeTextQuestion' , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null }
25292569 | { __typename : 'JsonQuestion' , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null }
25302570 | { __typename : 'NumberQuestion' , minValue ?: number | null , maxValue ?: number | null , stepValue ?: number | null , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null }
25312571 | { __typename : 'PredefinedQuestion' , allowMultipleSelection : boolean , id : string , questionText : string , questionOrder : number , timeoutSeconds ?: number | null , predefinedAnswers : Array < { __typename ?: 'QuizPredefinedAnswer' , id : string , answerText : string , answerOrder : number , isCorrect ?: boolean | null } > }
25322572 > , responses : Array <
2533- | { __typename : 'FreeTextResponse' , textResponse : string , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null }
2534- | { __typename : 'JsonResponse' , jsonResponse : any , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null }
2535- | { __typename : 'NumberResponse' , numberResponse : number , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null }
2536- | { __typename : 'PredefinedResponse' , isCorrect ?: boolean | null , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null , selectedAnswers : Array < { __typename ?: 'QuizPredefinedAnswer' , id : string , answerText : string , answerOrder : number , isCorrect ?: boolean | null } > }
2573+ | { __typename : 'FreeTextResponse' , textResponse : string , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null , question :
2574+ | { __typename ?: 'FreeTextQuestion' , id : string }
2575+ | { __typename ?: 'JsonQuestion' , id : string }
2576+ | { __typename ?: 'NumberQuestion' , id : string }
2577+ | { __typename ?: 'PredefinedQuestion' , id : string }
2578+ }
2579+ | { __typename : 'JsonResponse' , jsonResponse : any , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null , question :
2580+ | { __typename ?: 'FreeTextQuestion' , id : string }
2581+ | { __typename ?: 'JsonQuestion' , id : string }
2582+ | { __typename ?: 'NumberQuestion' , id : string }
2583+ | { __typename ?: 'PredefinedQuestion' , id : string }
2584+ }
2585+ | { __typename : 'NumberResponse' , numberResponse : number , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null , question :
2586+ | { __typename ?: 'FreeTextQuestion' , id : string }
2587+ | { __typename ?: 'JsonQuestion' , id : string }
2588+ | { __typename ?: 'NumberQuestion' , id : string }
2589+ | { __typename ?: 'PredefinedQuestion' , id : string }
2590+ }
2591+ | { __typename : 'PredefinedResponse' , isCorrect ?: boolean | null , id : string , answeredAt ?: any | null , timeSpentSeconds ?: number | null , selectedAnswers : Array < { __typename ?: 'QuizPredefinedAnswer' , id : string , answerText : string , answerOrder : number , isCorrect ?: boolean | null } > , question :
2592+ | { __typename ?: 'FreeTextQuestion' , id : string }
2593+ | { __typename ?: 'JsonQuestion' , id : string }
2594+ | { __typename ?: 'NumberQuestion' , id : string }
2595+ | { __typename ?: 'PredefinedQuestion' , id : string }
2596+ }
25372597 > } > } }
25382598 | { __typename : 'SimpleChallenge' , allowSelfCompletion : boolean , id : string , name : string , description : any , userEnrolledAt ?: any | null , userCompletedAt ?: any | null }
25392599 } ;
@@ -3015,6 +3075,7 @@ export const StartQuizDocument = gql`
30153075 isExpired
30163076 questionOrder
30173077 orderedQuestions {
3078+ __typename
30183079 id
30193080 questionText
30203081 questionOrder
@@ -3046,6 +3107,48 @@ export const StartQuizDocument = gql`
30463107export function useStartQuizMutation ( ) {
30473108 return Urql . useMutation < StartQuizMutation , StartQuizMutationVariables > ( StartQuizDocument ) ;
30483109} ;
3110+ export const SubmitQuizAnswerDocument = gql `
3111+ mutation SubmitQuizAnswer($submissionId: ID!, $input: SubmitQuizAnswerInput!) {
3112+ submitQuizAnswer(submissionId: $submissionId, input: $input) {
3113+ __typename
3114+ id
3115+ answeredAt
3116+ timeSpentSeconds
3117+ question {
3118+ id
3119+ }
3120+ ... on PredefinedResponse {
3121+ isCorrect
3122+ selectedAnswerIds
3123+ selectedAnswers {
3124+ id
3125+ answerText
3126+ isCorrect
3127+ }
3128+ }
3129+ }
3130+ }
3131+ ` ;
3132+
3133+ export function useSubmitQuizAnswerMutation ( ) {
3134+ return Urql . useMutation < SubmitQuizAnswerMutation , SubmitQuizAnswerMutationVariables > ( SubmitQuizAnswerDocument ) ;
3135+ } ;
3136+ export const FinalizeQuizDocument = gql `
3137+ mutation FinalizeQuiz($submissionId: ID!) {
3138+ finalizeQuiz(submissionId: $submissionId) {
3139+ id
3140+ completedAt
3141+ score
3142+ maxScore
3143+ scorePercentage
3144+ pointsAwarded
3145+ }
3146+ }
3147+ ` ;
3148+
3149+ export function useFinalizeQuizMutation ( ) {
3150+ return Urql . useMutation < FinalizeQuizMutation , FinalizeQuizMutationVariables > ( FinalizeQuizDocument ) ;
3151+ } ;
30493152export const AssignRoleDocument = gql `
30503153 mutation AssignRole($input: AssignRoleInput!) {
30513154 assignRole(input: $input) {
@@ -3218,7 +3321,7 @@ export const ChallengePageDocument = gql`
32183321 score
32193322 maxScore
32203323 scorePercentage
3221- scorePercentage
3324+ pointsAwarded
32223325 orderedQuestions {
32233326 __typename
32243327 id
@@ -3245,6 +3348,9 @@ export const ChallengePageDocument = gql`
32453348 id
32463349 answeredAt
32473350 timeSpentSeconds
3351+ question {
3352+ id
3353+ }
32483354 ... on FreeTextResponse {
32493355 textResponse
32503356 }
0 commit comments