-
-
-
-
-
-
-
void
+ open: boolean
+ setOpen: (value: boolean) => void
}
function CancelSessionModal({
sessionId,
title,
- isCancellationModalOpen,
- setIsCancellationModalOpen,
+ open,
+ setOpen,
}: CancelSessionModalProps) {
const router = useRouter()
const t = useTranslations()
- const [enteredName, setEnteredName] = useState('')
- const [cancelSession] = useMutation(CancelSessionDocument, {
- variables: { id: sessionId },
- refetchQueries: [
- {
- query: GetUserRunningSessionsDocument,
- },
- {
- query: GetUserSessionsDocument,
- },
- ],
+ const initialConfirmations: SessionAbortionConfirmationType = {
+ deleteResponses: false,
+ deleteFeedbacks: false,
+ deleteConfusionFeedbacks: false,
+ deleteLeaderboardEntries: false,
+ }
+
+ const [confirmations, setConfirmations] =
+ useState({
+ ...initialConfirmations,
+ })
+
+ // fetch course information
+ const {
+ data,
+ loading: queryLoading,
+ refetch,
+ } = useQuery(GetLiveQuizSummaryDocument, {
+ variables: { quizId: sessionId },
+ skip: !open,
})
+ const [cancelSession, { loading: sessionDeleting }] = useMutation(
+ CancelSessionDocument,
+ {
+ variables: { id: sessionId },
+ refetchQueries: [
+ {
+ query: GetUserRunningSessionsDocument,
+ },
+ {
+ query: GetUserSessionsDocument,
+ },
+ ],
+ }
+ )
+
+ // manually re-trigger the query when the modal is opened
+ useEffect(() => {
+ if (open) {
+ refetch()
+ }
+ }, [open])
+
+ useEffect(() => {
+ if (!data?.getLiveQuizSummary) {
+ return
+ }
+
+ setConfirmations({
+ deleteResponses: data.getLiveQuizSummary.numOfResponses === 0,
+ deleteFeedbacks: data.getLiveQuizSummary.numOfFeedbacks === 0,
+ deleteConfusionFeedbacks:
+ data.getLiveQuizSummary.numOfConfusionFeedbacks === 0,
+ deleteLeaderboardEntries:
+ data.getLiveQuizSummary.numOfLeaderboardEntries === 0,
+ })
+ }, [data?.getLiveQuizSummary])
+
+ if (!data?.getLiveQuizSummary) {
+ return null
+ }
+
+ const summary = data.getLiveQuizSummary
+
return (
{
+ setOpen(false)
+ setConfirmations({ ...initialConfirmations })
+ }}
+ className={{ content: '!w-full max-w-[60rem]' }}
+ title={t('manage.cockpit.confirmAbortSession', { title: title })}
onPrimaryAction={
}
onSecondaryAction={
}
- onClose={(): void => setIsCancellationModalOpen(false)}
- open={isCancellationModalOpen}
- hideCloseButton={true}
- className={{ content: 'h-max min-h-max w-[48rem] self-center !pt-0' }}
>
-
-
{t('manage.cockpit.confirmAbortSession', { title: title })}
-
- {t('manage.cockpit.abortSessionHint')}
-
-
-
{t('manage.cockpit.abortEnterName')}
-
setEnteredName(newValue)}
- className={{ input: '!w-80' }}
- data={{ cy: 'abort-enter-name' }}
- />
-
-
+
)
}
diff --git a/apps/frontend-manage/src/components/sessions/cockpit/SessionAbortionConfirmations.tsx b/apps/frontend-manage/src/components/sessions/cockpit/SessionAbortionConfirmations.tsx
new file mode 100644
index 0000000000..c69f6c0e9e
--- /dev/null
+++ b/apps/frontend-manage/src/components/sessions/cockpit/SessionAbortionConfirmations.tsx
@@ -0,0 +1,104 @@
+import DeletionItem from '@components/common/DeletionItem'
+import { RunningLiveQuizSummary } from '@klicker-uzh/graphql/dist/ops'
+import { UserNotification } from '@uzh-bf/design-system'
+import { useTranslations } from 'next-intl'
+import { Dispatch, SetStateAction } from 'react'
+import { SessionAbortionConfirmationType } from './CancelSessionModal'
+
+interface SessionAbortionConfirmationsProps {
+ summary: RunningLiveQuizSummary
+ confirmations: SessionAbortionConfirmationType
+ setConfirmations: Dispatch>
+}
+
+function SessionAbortionConfirmations({
+ summary,
+ confirmations,
+ setConfirmations,
+}: SessionAbortionConfirmationsProps) {
+ const t = useTranslations()
+
+ return (
+
+
+ {
+ setConfirmations((prev) => ({
+ ...prev,
+ deleteResponses: true,
+ }))
+ }}
+ confirmed={confirmations.deleteResponses}
+ notApplicable={summary.numOfResponses === 0}
+ data={{ cy: 'lq-deletion-responses-confirm' }}
+ />
+ {
+ setConfirmations((prev) => ({
+ ...prev,
+ deleteFeedbacks: true,
+ }))
+ }}
+ confirmed={confirmations.deleteFeedbacks}
+ notApplicable={summary.numOfFeedbacks === 0}
+ data={{ cy: 'lq-deletion-feedbacks-confirm' }}
+ />
+ {
+ setConfirmations((prev) => ({
+ ...prev,
+ deleteConfusionFeedbacks: true,
+ }))
+ }}
+ confirmed={confirmations.deleteConfusionFeedbacks}
+ notApplicable={summary.numOfConfusionFeedbacks === 0}
+ data={{ cy: 'lq-deletion-confusion-feedbacks-confirm' }}
+ />
+ {
+ setConfirmations((prev) => ({
+ ...prev,
+ deleteLeaderboardEntries: true,
+ }))
+ }}
+ confirmed={confirmations.deleteLeaderboardEntries}
+ notApplicable={summary.numOfLeaderboardEntries === 0}
+ data={{ cy: 'lq-deletion-leaderboard-entries-confirm' }}
+ />
+
+ )
+}
+
+export default SessionAbortionConfirmations
diff --git a/apps/frontend-manage/src/components/sessions/cockpit/SessionTimeline.tsx b/apps/frontend-manage/src/components/sessions/cockpit/SessionTimeline.tsx
index d1ed5df919..ed24ff22af 100644
--- a/apps/frontend-manage/src/components/sessions/cockpit/SessionTimeline.tsx
+++ b/apps/frontend-manage/src/components/sessions/cockpit/SessionTimeline.tsx
@@ -319,8 +319,8 @@ function SessionTimeline({
diff --git a/apps/frontend-manage/src/pages/sessions/[id]/cockpit.tsx b/apps/frontend-manage/src/pages/sessions/[id]/cockpit.tsx
index d230b546bc..3b7e102433 100644
--- a/apps/frontend-manage/src/pages/sessions/[id]/cockpit.tsx
+++ b/apps/frontend-manage/src/pages/sessions/[id]/cockpit.tsx
@@ -37,28 +37,6 @@ function Cockpit() {
],
})
- // useEffect((): void => {
- // router.prefetch('/sessions/evaluation')
- // router.prefetch('/sessions/feedbacks')
- // router.prefetch('/join')
- // router.prefetch('/qr')
- // }, [router])
-
- // TODO: implement missing queries and corresponding frontend components
- // const accountSummary = useQuery(AccountSummaryQuery)
- // const { data, loading, error, subscribeToMore } = useQuery(RunningSessionQuery, {
- // pollInterval: 10000,
- // })
- // const [updateSettings, { loading: isUpdateSettingsLoading }] = useMutation(UpdateSessionSettingsMutation)
- // const [endSession, { loading: isEndSessionLoading }] = useMutation(EndSessionMutation)
- // const [pauseSession, { loading: isPauseSessionLoading }] = useMutation(PauseSessionMutation)
- // const [resetQuestionBlock, { loading: isResetQuestionBlockLoading }] = useMutation(ResetQuestionBlockMutation)
- // const [cancelSession, { loading: isCancelSessionLoading }] = useMutation(CancelSessionMutation)
- // const [activateNextBlock, { loading: isActivateNextBlockLoading }] = useMutation(ActivateNextBlockMutation)
- // const [activateBlockById, { loading: isActivateBlockByIdLoading }] = useMutation(ActivateBlockByIdMutation)
-
- // const shortname = _get(accountSummary, 'data.user.shortname')
-
const {
loading: cockpitLoading,
error: cockpitError,
diff --git a/cypress/cypress/e2e/F-live-quiz-workflow.cy.ts b/cypress/cypress/e2e/F-live-quiz-workflow.cy.ts
index 53fb61a452..1bbde5c5f3 100644
--- a/cypress/cypress/e2e/F-live-quiz-workflow.cy.ts
+++ b/cypress/cypress/e2e/F-live-quiz-workflow.cy.ts
@@ -609,6 +609,7 @@ describe('Different live-quiz workflows', () => {
})
it('creates a session, starts it and aborts it and then restarts it', () => {
+ const courseName = 'Testkurs'
const questionTitle = uuid()
const question = uuid()
const sessionName = uuid()
@@ -627,6 +628,12 @@ describe('Different live-quiz workflows', () => {
cy.get('[data-cy="next-or-submit"]').click()
cy.get('[data-cy="insert-live-display-name"]').type(session)
cy.get('[data-cy="next-or-submit"]').click()
+
+ cy.get('[data-cy="select-course"]').click()
+ cy.get(`[data-cy="select-course-${courseName}"]`).click()
+ cy.get('[data-cy="select-course"]').contains(courseName)
+ cy.get('[data-cy="set-liveqa-enabled"]').click()
+ cy.get('[data-cy="set-liveqa-moderation"]').click()
cy.get('[data-cy="next-or-submit"]').click()
const dataTransfer = new DataTransfer()
@@ -648,8 +655,34 @@ describe('Different live-quiz workflows', () => {
cy.get('[data-cy="abort-session-cockpit"]').click()
cy.get('[data-cy="abort-cancel-session"]').click()
cy.get('[data-cy="abort-session-cockpit"]').click()
+ cy.get('[data-cy="confirm-cancel-session"]').should('not.be.disabled')
+ cy.get('[data-cy="abort-cancel-session"]').click()
+
+ // students submit feedback
+ const feedback = uuid()
+ cy.loginStudent()
+ cy.clearAllLocalStorage()
+ cy.findByText(session).click()
+ cy.get('[data-cy="feedback-input"]').type(feedback)
+ cy.get('[data-cy="feedback-submit"]').click()
+ cy.findByText(feedback).should('exist')
+
+ // abort the session after confirming the feedback deletion
+ cy.loginLecturer()
+ cy.get('[data-cy="sessions"]').click()
+ cy.get(`[data-cy="session-cockpit-${sessionName}"]`).click()
+ cy.wait(1000)
+ cy.get('[data-cy="abort-session-cockpit"]').click()
+ cy.get('[data-cy="confirm-cancel-session"]').should('be.disabled')
+ cy.get('[data-cy="lq-deletion-responses-confirm"]').should('not.exist')
+ cy.get('[data-cy="lq-deletion-confusion-feedbacks-confirm"]').should(
+ 'not.exist'
+ )
+ cy.get('[data-cy="lq-deletion-leaderboard-entries-confirm"]').should(
+ 'not.exist'
+ )
cy.get('[data-cy="confirm-cancel-session"]').should('be.disabled')
- cy.get('[data-cy="abort-enter-name"]').type(sessionName)
+ cy.get('[data-cy="lq-deletion-feedbacks-confirm"]').click()
cy.get('[data-cy="confirm-cancel-session"]')
.should('not.be.disabled')
.click()
diff --git a/packages/graphql/src/graphql/ops/QGetLiveQuizSummary.graphql b/packages/graphql/src/graphql/ops/QGetLiveQuizSummary.graphql
new file mode 100644
index 0000000000..9a3ba9717c
--- /dev/null
+++ b/packages/graphql/src/graphql/ops/QGetLiveQuizSummary.graphql
@@ -0,0 +1,8 @@
+query GetLiveQuizSummary($quizId: String!) {
+ getLiveQuizSummary(quizId: $quizId) {
+ numOfResponses
+ numOfFeedbacks
+ numOfConfusionFeedbacks
+ numOfLeaderboardEntries
+ }
+}
diff --git a/packages/graphql/src/ops.schema.json b/packages/graphql/src/ops.schema.json
index cef2650813..4fbcdf7dbd 100644
--- a/packages/graphql/src/ops.schema.json
+++ b/packages/graphql/src/ops.schema.json
@@ -16693,6 +16693,35 @@
"isDeprecated": false,
"deprecationReason": null
},
+ {
+ "name": "getLiveQuizSummary",
+ "description": null,
+ "args": [
+ {
+ "name": "quizId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "RunningLiveQuizSummary",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
{
"name": "getLoginToken",
"description": null,
@@ -18451,6 +18480,81 @@
"enumValues": null,
"possibleTypes": null
},
+ {
+ "kind": "OBJECT",
+ "name": "RunningLiveQuizSummary",
+ "description": null,
+ "fields": [
+ {
+ "name": "numOfConfusionFeedbacks",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "numOfFeedbacks",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "numOfLeaderboardEntries",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "numOfResponses",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
{
"kind": "OBJECT",
"name": "Session",
diff --git a/packages/graphql/src/ops.ts b/packages/graphql/src/ops.ts
index 2334bde0e7..99ea9a0a0b 100644
--- a/packages/graphql/src/ops.ts
+++ b/packages/graphql/src/ops.ts
@@ -1833,6 +1833,7 @@ export type Query = {
getCourseOverviewData?: Maybe
;
getCourseSummary?: Maybe;
getGradingGroupActivity?: Maybe;
+ getLiveQuizSummary?: Maybe;
getLoginToken?: Maybe;
getMicroLearningEvaluation?: Maybe;
getParticipation?: Maybe;
@@ -1956,6 +1957,11 @@ export type QueryGetGradingGroupActivityArgs = {
};
+export type QueryGetLiveQuizSummaryArgs = {
+ quizId: Scalars['String']['input'];
+};
+
+
export type QueryGetMicroLearningEvaluationArgs = {
id: Scalars['String']['input'];
};
@@ -2150,6 +2156,14 @@ export type ResponseInput = {
value?: InputMaybe;
};
+export type RunningLiveQuizSummary = {
+ __typename?: 'RunningLiveQuizSummary';
+ numOfConfusionFeedbacks: Scalars['Int']['output'];
+ numOfFeedbacks: Scalars['Int']['output'];
+ numOfLeaderboardEntries: Scalars['Int']['output'];
+ numOfResponses: Scalars['Int']['output'];
+};
+
export type Session = {
__typename?: 'Session';
accessMode: SessionAccessMode;
@@ -3427,6 +3441,13 @@ export type GetGroupActivityQueryVariables = Exact<{
export type GetGroupActivityQuery = { __typename?: 'Query', groupActivity?: { __typename?: 'GroupActivity', id: string, name: string, displayName: string, description?: string | null, pointsMultiplier?: number | null, scheduledStartAt: any, scheduledEndAt: any, clues?: Array<{ __typename?: 'GroupActivityClue', id: number, type: ParameterType, name: string, displayName: string, value: string, unit?: string | null }> | null, stacks?: Array<{ __typename?: 'ElementStack', id: number, displayName?: string | null, description?: string | null, elements?: Array<{ __typename?: 'ElementInstance', id: number, type: ElementInstanceType, elementType: ElementType, elementData: { __typename?: 'ChoicesElementData', id: string, elementId?: number | null, name: string, type: ElementType, content: string, explanation?: string | null, options: { __typename?: 'ChoiceQuestionOptions', displayMode: ElementDisplayMode, choices: Array<{ __typename?: 'Choice', ix: number, value: string }> } } | { __typename?: 'ContentElementData', id: string, elementId?: number | null, name: string, type: ElementType, content: string, explanation?: string | null } | { __typename?: 'FlashcardElementData', id: string, elementId?: number | null, name: string, type: ElementType, content: string, explanation?: string | null } | { __typename?: 'FreeTextElementData', id: string, elementId?: number | null, name: string, type: ElementType, content: string, explanation?: string | null, options: { __typename?: 'FreeTextQuestionOptions', restrictions?: { __typename?: 'FreeTextRestrictions', maxLength?: number | null } | null } } | { __typename?: 'NumericalElementData', id: string, elementId?: number | null, name: string, type: ElementType, content: string, explanation?: string | null, options: { __typename?: 'NumericalQuestionOptions', accuracy?: number | null, placeholder?: string | null, unit?: string | null, restrictions?: { __typename?: 'NumericalRestrictions', min?: number | null, max?: number | null } | null } } }> | null }> | null, course?: { __typename?: 'Course', id: string, displayName: string } | null } | null };
+export type GetLiveQuizSummaryQueryVariables = Exact<{
+ quizId: Scalars['String']['input'];
+}>;
+
+
+export type GetLiveQuizSummaryQuery = { __typename?: 'Query', getLiveQuizSummary?: { __typename?: 'RunningLiveQuizSummary', numOfResponses: number, numOfFeedbacks: number, numOfConfusionFeedbacks: number, numOfLeaderboardEntries: number } | null };
+
export type GetLoginTokenQueryVariables = Exact<{ [key: string]: never; }>;
@@ -3840,6 +3861,7 @@ export const GetCourseSummaryDocument = {"kind":"Document","definitions":[{"kind
export const GetFeedbacksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetFeedbacks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"sessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"feedbacks"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"sessionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isPublished"}},{"kind":"Field","name":{"kind":"Name","value":"isPinned"}},{"kind":"Field","name":{"kind":"Name","value":"isResolved"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"votes"}},{"kind":"Field","name":{"kind":"Name","value":"resolvedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"positiveReactions"}},{"kind":"Field","name":{"kind":"Name","value":"negativeReactions"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]}}]}}]} as unknown as DocumentNode;
export const GetGradingGroupActivityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetGradingGroupActivity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getGradingGroupActivity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"pointsMultiplier"}},{"kind":"Field","name":{"kind":"Name","value":"scheduledStartAt"}},{"kind":"Field","name":{"kind":"Name","value":"scheduledEndAt"}},{"kind":"Field","name":{"kind":"Name","value":"clues"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stacks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"elements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"elementType"}},{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pointsMultiplier"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ElementDataWithoutSolutions"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"activityInstances"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"decisions"}},{"kind":"Field","name":{"kind":"Name","value":"decisionsSubmittedAt"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"resultsComputedAt"}},{"kind":"Field","name":{"kind":"Name","value":"groupName"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ElementDataWithoutSolutions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ElementInstance"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"elementData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"elementId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"explanation"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ChoicesElementData"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"displayMode"}},{"kind":"Field","name":{"kind":"Name","value":"choices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ix"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NumericalElementData"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accuracy"}},{"kind":"Field","name":{"kind":"Name","value":"placeholder"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"restrictions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"min"}},{"kind":"Field","name":{"kind":"Name","value":"max"}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FreeTextElementData"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"restrictions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"maxLength"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode;
export const GetGroupActivityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetGroupActivity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"groupActivity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"pointsMultiplier"}},{"kind":"Field","name":{"kind":"Name","value":"scheduledStartAt"}},{"kind":"Field","name":{"kind":"Name","value":"scheduledEndAt"}},{"kind":"Field","name":{"kind":"Name","value":"clues"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stacks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"elements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"elementType"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ElementDataWithoutSolutions"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"course"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ElementDataWithoutSolutions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ElementInstance"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"elementData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"elementId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"explanation"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ChoicesElementData"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"displayMode"}},{"kind":"Field","name":{"kind":"Name","value":"choices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ix"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NumericalElementData"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accuracy"}},{"kind":"Field","name":{"kind":"Name","value":"placeholder"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"restrictions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"min"}},{"kind":"Field","name":{"kind":"Name","value":"max"}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FreeTextElementData"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"restrictions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"maxLength"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode;
+export const GetLiveQuizSummaryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLiveQuizSummary"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quizId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getLiveQuizSummary"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quizId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quizId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"numOfResponses"}},{"kind":"Field","name":{"kind":"Name","value":"numOfFeedbacks"}},{"kind":"Field","name":{"kind":"Name","value":"numOfConfusionFeedbacks"}},{"kind":"Field","name":{"kind":"Name","value":"numOfLeaderboardEntries"}}]}}]}}]} as unknown as DocumentNode;
export const GetLoginTokenDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLoginToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getLoginToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"loginToken"}},{"kind":"Field","name":{"kind":"Name","value":"loginTokenExpiresAt"}}]}}]}}]} as unknown as DocumentNode;
export const GetMicroLearningEvaluationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetMicroLearningEvaluation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getMicroLearningEvaluation"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"EvaluationResults"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EvaluationResults"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActivityEvaluation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"results"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stackId"}},{"kind":"Field","name":{"kind":"Name","value":"stackName"}},{"kind":"Field","name":{"kind":"Name","value":"stackDescription"}},{"kind":"Field","name":{"kind":"Name","value":"stackOrder"}},{"kind":"Field","name":{"kind":"Name","value":"instances"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"explanation"}},{"kind":"Field","name":{"kind":"Name","value":"hasSampleSolution"}},{"kind":"Field","name":{"kind":"Name","value":"hasAnswerFeedbacks"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ChoicesElementInstanceEvaluation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"results"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalAnswers"}},{"kind":"Field","name":{"kind":"Name","value":"anonymousAnswers"}},{"kind":"Field","name":{"kind":"Name","value":"choices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"count"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"feedback"}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FreeElementInstanceEvaluation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"results"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalAnswers"}},{"kind":"Field","name":{"kind":"Name","value":"anonymousAnswers"}},{"kind":"Field","name":{"kind":"Name","value":"maxLength"}},{"kind":"Field","name":{"kind":"Name","value":"solutions"}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"count"}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NumericalElementInstanceEvaluation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"results"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalAnswers"}},{"kind":"Field","name":{"kind":"Name","value":"anonymousAnswers"}},{"kind":"Field","name":{"kind":"Name","value":"maxValue"}},{"kind":"Field","name":{"kind":"Name","value":"minValue"}},{"kind":"Field","name":{"kind":"Name","value":"solutionRanges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"min"}},{"kind":"Field","name":{"kind":"Name","value":"max"}}]}},{"kind":"Field","name":{"kind":"Name","value":"responseValues"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"count"}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FlashcardElementInstanceEvaluation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"results"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalAnswers"}},{"kind":"Field","name":{"kind":"Name","value":"anonymousAnswers"}},{"kind":"Field","name":{"kind":"Name","value":"correctCount"}},{"kind":"Field","name":{"kind":"Name","value":"partialCount"}},{"kind":"Field","name":{"kind":"Name","value":"incorrectCount"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentElementInstanceEvaluation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"results"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalAnswers"}},{"kind":"Field","name":{"kind":"Name","value":"anonymousAnswers"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode;
export const GetMicroLearningDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetMicroLearning"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"microLearning"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MicroLearningDataWithoutSolutions"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ElementDataWithoutSolutions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ElementInstance"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"elementData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"elementId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"explanation"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ChoicesElementData"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"displayMode"}},{"kind":"Field","name":{"kind":"Name","value":"choices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ix"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NumericalElementData"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accuracy"}},{"kind":"Field","name":{"kind":"Name","value":"placeholder"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"restrictions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"min"}},{"kind":"Field","name":{"kind":"Name","value":"max"}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FreeTextElementData"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"restrictions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"maxLength"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MicroLearningDataWithoutSolutions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MicroLearning"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"pointsMultiplier"}},{"kind":"Field","name":{"kind":"Name","value":"scheduledStartAt"}},{"kind":"Field","name":{"kind":"Name","value":"scheduledEndAt"}},{"kind":"Field","name":{"kind":"Name","value":"course"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"color"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stacks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"order"}},{"kind":"Field","name":{"kind":"Name","value":"elements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"elementType"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ElementDataWithoutSolutions"}}]}}]}}]}}]} as unknown as DocumentNode;
diff --git a/packages/graphql/src/public/client.json b/packages/graphql/src/public/client.json
index 5cb767723b..60a665a522 100644
--- a/packages/graphql/src/public/client.json
+++ b/packages/graphql/src/public/client.json
@@ -121,6 +121,7 @@
"GetFeedbacks": "b33e84156822ff5ba3013fb1ddb31eae21ecfd40c1249b6e9db361ed774a83f8",
"GetGradingGroupActivity": "79c2a520d7da8752514c6c34383596a36a40f9d9a67c4850e819a30e61b63bae",
"GetGroupActivity": "bc04bd4d995633af0a94f2ca24b203d9c39ca557dd5f12589fa41419a505b11d",
+ "GetLiveQuizSummary": "fd17c092be3d096abd6d31e89d8249bd4b482a2a6310f6893e9e32c5a70666c0",
"GetLoginToken": "491946fc1fcbd066ea481c564313f4e50b7cc98ea16ab16a7a2146d75ec8cf00",
"GetMicroLearningEvaluation": "d3d5c8d25a6410b8c93c63414a5c0041a2a1d2a3d08c8e8f58ab4c43453e3162",
"GetMicroLearning": "102ab86dad081a15a6087cb33f13d58c547ea0edbac9a536e7f573b84362e6c6",
diff --git a/packages/graphql/src/public/schema.graphql b/packages/graphql/src/public/schema.graphql
index c86023b811..bab84d2b33 100644
--- a/packages/graphql/src/public/schema.graphql
+++ b/packages/graphql/src/public/schema.graphql
@@ -1080,6 +1080,7 @@ type Query {
getCourseOverviewData(courseId: String!): ParticipantLearningData
getCourseSummary(courseId: String!): CourseSummary
getGradingGroupActivity(id: String!): GroupActivity
+ getLiveQuizSummary(quizId: String!): RunningLiveQuizSummary
getLoginToken: User
getMicroLearningEvaluation(id: String!): ActivityEvaluation
getParticipation(courseId: String!): Participation
@@ -1194,6 +1195,13 @@ input ResponseInput {
value: String
}
+type RunningLiveQuizSummary {
+ numOfConfusionFeedbacks: Int!
+ numOfFeedbacks: Int!
+ numOfLeaderboardEntries: Int!
+ numOfResponses: Int!
+}
+
type Session {
accessMode: SessionAccessMode!
activeBlock: SessionBlock
diff --git a/packages/graphql/src/public/server.json b/packages/graphql/src/public/server.json
index a1cf0e1351..96dd0df042 100644
--- a/packages/graphql/src/public/server.json
+++ b/packages/graphql/src/public/server.json
@@ -121,6 +121,7 @@
"b33e84156822ff5ba3013fb1ddb31eae21ecfd40c1249b6e9db361ed774a83f8": "query GetFeedbacks($sessionId: String!) {\n feedbacks(id: $sessionId) {\n id\n isPublished\n isPinned\n isResolved\n content\n votes\n resolvedAt\n createdAt\n responses {\n id\n content\n positiveReactions\n negativeReactions\n createdAt\n __typename\n }\n __typename\n }\n}",
"79c2a520d7da8752514c6c34383596a36a40f9d9a67c4850e819a30e61b63bae": "fragment ElementDataWithoutSolutions on ElementInstance {\n elementData {\n id\n elementId\n name\n type\n content\n explanation\n ... on ChoicesElementData {\n options {\n displayMode\n choices {\n ix\n value\n __typename\n }\n __typename\n }\n __typename\n }\n ... on NumericalElementData {\n options {\n accuracy\n placeholder\n unit\n restrictions {\n min\n max\n __typename\n }\n __typename\n }\n __typename\n }\n ... on FreeTextElementData {\n options {\n restrictions {\n maxLength\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n}\nquery GetGradingGroupActivity($id: String!) {\n getGradingGroupActivity(id: $id) {\n id\n name\n displayName\n description\n status\n pointsMultiplier\n scheduledStartAt\n scheduledEndAt\n clues {\n id\n type\n name\n displayName\n value\n unit\n __typename\n }\n stacks {\n id\n displayName\n description\n elements {\n id\n type\n elementType\n options {\n pointsMultiplier\n __typename\n }\n ...ElementDataWithoutSolutions\n __typename\n }\n __typename\n }\n activityInstances {\n id\n decisions\n decisionsSubmittedAt\n results\n resultsComputedAt\n groupName\n __typename\n }\n __typename\n }\n}",
"bc04bd4d995633af0a94f2ca24b203d9c39ca557dd5f12589fa41419a505b11d": "fragment ElementDataWithoutSolutions on ElementInstance {\n elementData {\n id\n elementId\n name\n type\n content\n explanation\n ... on ChoicesElementData {\n options {\n displayMode\n choices {\n ix\n value\n __typename\n }\n __typename\n }\n __typename\n }\n ... on NumericalElementData {\n options {\n accuracy\n placeholder\n unit\n restrictions {\n min\n max\n __typename\n }\n __typename\n }\n __typename\n }\n ... on FreeTextElementData {\n options {\n restrictions {\n maxLength\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n}\nquery GetGroupActivity($id: String!) {\n groupActivity(id: $id) {\n id\n name\n displayName\n description\n pointsMultiplier\n scheduledStartAt\n scheduledEndAt\n clues {\n id\n type\n name\n displayName\n value\n unit\n __typename\n }\n stacks {\n id\n displayName\n description\n elements {\n id\n type\n elementType\n ...ElementDataWithoutSolutions\n __typename\n }\n __typename\n }\n course {\n id\n displayName\n __typename\n }\n __typename\n }\n}",
+ "fd17c092be3d096abd6d31e89d8249bd4b482a2a6310f6893e9e32c5a70666c0": "query GetLiveQuizSummary($quizId: String!) {\n getLiveQuizSummary(quizId: $quizId) {\n numOfResponses\n numOfFeedbacks\n numOfConfusionFeedbacks\n numOfLeaderboardEntries\n __typename\n }\n}",
"491946fc1fcbd066ea481c564313f4e50b7cc98ea16ab16a7a2146d75ec8cf00": "query GetLoginToken {\n getLoginToken {\n loginToken\n loginTokenExpiresAt\n __typename\n }\n}",
"d3d5c8d25a6410b8c93c63414a5c0041a2a1d2a3d08c8e8f58ab4c43453e3162": "fragment EvaluationResults on ActivityEvaluation {\n results {\n stackId\n stackName\n stackDescription\n stackOrder\n instances {\n id\n type\n name\n content\n explanation\n hasSampleSolution\n hasAnswerFeedbacks\n ... on ChoicesElementInstanceEvaluation {\n results {\n totalAnswers\n anonymousAnswers\n choices {\n value\n count\n correct\n feedback\n __typename\n }\n __typename\n }\n __typename\n }\n ... on FreeElementInstanceEvaluation {\n results {\n totalAnswers\n anonymousAnswers\n maxLength\n solutions\n responses {\n value\n correct\n count\n __typename\n }\n __typename\n }\n __typename\n }\n ... on NumericalElementInstanceEvaluation {\n results {\n totalAnswers\n anonymousAnswers\n maxValue\n minValue\n solutionRanges {\n min\n max\n __typename\n }\n responseValues {\n value\n correct\n count\n __typename\n }\n __typename\n }\n __typename\n }\n ... on FlashcardElementInstanceEvaluation {\n results {\n totalAnswers\n anonymousAnswers\n correctCount\n partialCount\n incorrectCount\n __typename\n }\n __typename\n }\n ... on ContentElementInstanceEvaluation {\n results {\n totalAnswers\n anonymousAnswers\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n}\nquery GetMicroLearningEvaluation($id: String!) {\n getMicroLearningEvaluation(id: $id) {\n id\n name\n displayName\n description\n ...EvaluationResults\n __typename\n }\n}",
"102ab86dad081a15a6087cb33f13d58c547ea0edbac9a536e7f573b84362e6c6": "fragment MicroLearningDataWithoutSolutions on MicroLearning {\n id\n name\n status\n displayName\n description\n pointsMultiplier\n scheduledStartAt\n scheduledEndAt\n course {\n id\n displayName\n color\n __typename\n }\n stacks {\n id\n type\n displayName\n description\n order\n elements {\n id\n type\n elementType\n ...ElementDataWithoutSolutions\n __typename\n }\n __typename\n }\n __typename\n}\nfragment ElementDataWithoutSolutions on ElementInstance {\n elementData {\n id\n elementId\n name\n type\n content\n explanation\n ... on ChoicesElementData {\n options {\n displayMode\n choices {\n ix\n value\n __typename\n }\n __typename\n }\n __typename\n }\n ... on NumericalElementData {\n options {\n accuracy\n placeholder\n unit\n restrictions {\n min\n max\n __typename\n }\n __typename\n }\n __typename\n }\n ... on FreeTextElementData {\n options {\n restrictions {\n maxLength\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n}\nquery GetMicroLearning($id: String!) {\n microLearning(id: $id) {\n ...MicroLearningDataWithoutSolutions\n __typename\n }\n}",
diff --git a/packages/graphql/src/schema/query.ts b/packages/graphql/src/schema/query.ts
index 9089b0ab44..45e9ef3e45 100644
--- a/packages/graphql/src/schema/query.ts
+++ b/packages/graphql/src/schema/query.ts
@@ -28,7 +28,12 @@ import {
} from './participant.js'
import { ElementStack, PracticeQuiz, StackFeedback } from './practiceQuizzes.js'
import { Element, Tag } from './question.js'
-import { Feedback, Session, SessionEvaluation } from './session.js'
+import {
+ Feedback,
+ RunningLiveQuizSummary,
+ Session,
+ SessionEvaluation,
+} from './session.js'
import { MediaFile, User, UserLogin, UserLoginScope } from './user.js'
export const Query = builder.queryType({
@@ -234,6 +239,17 @@ export const Query = builder.queryType({
},
}),
+ getLiveQuizSummary: asUser.field({
+ nullable: true,
+ type: RunningLiveQuizSummary,
+ args: {
+ quizId: t.arg.string({ required: true }),
+ },
+ resolve(_, args, ctx) {
+ return SessionService.getLiveQuizSummary(args, ctx)
+ },
+ }),
+
runningSessionsCourse: t.field({
nullable: true,
type: [Session],
diff --git a/packages/graphql/src/schema/session.ts b/packages/graphql/src/schema/session.ts
index 3ff2714aad..f03e781ebc 100644
--- a/packages/graphql/src/schema/session.ts
+++ b/packages/graphql/src/schema/session.ts
@@ -126,6 +126,23 @@ export const SessionBlock = SessionBlockRef.implement({
}),
})
+export interface IRunningLiveQuizSummary {
+ numOfResponses: number
+ numOfFeedbacks: number
+ numOfConfusionFeedbacks: number
+ numOfLeaderboardEntries: number
+}
+export const RunningLiveQuizSummaryRef =
+ builder.objectRef('RunningLiveQuizSummary')
+export const RunningLiveQuizSummary = RunningLiveQuizSummaryRef.implement({
+ fields: (t) => ({
+ numOfResponses: t.exposeInt('numOfResponses'),
+ numOfFeedbacks: t.exposeInt('numOfFeedbacks'),
+ numOfConfusionFeedbacks: t.exposeInt('numOfConfusionFeedbacks'),
+ numOfLeaderboardEntries: t.exposeInt('numOfLeaderboardEntries'),
+ }),
+})
+
export interface IFeedback extends DB.Feedback {
responses?: DB.FeedbackResponse[]
}
diff --git a/packages/graphql/src/services/sessions.ts b/packages/graphql/src/services/sessions.ts
index 4c55c85f5e..c7971661ae 100644
--- a/packages/graphql/src/services/sessions.ts
+++ b/packages/graphql/src/services/sessions.ts
@@ -2249,6 +2249,49 @@ export async function deleteSession(
}
}
+export async function getLiveQuizSummary(
+ { quizId }: { quizId: string },
+ ctx: ContextWithUser
+) {
+ const liveQuiz = await ctx.prisma.liveSession.findUnique({
+ where: {
+ id: quizId,
+ ownerId: ctx.user.sub,
+ },
+ include: {
+ _count: {
+ select: {
+ feedbacks: true,
+ confusionFeedbacks: true,
+ leaderboard: true,
+ },
+ },
+ blocks: {
+ include: {
+ instances: true,
+ },
+ },
+ },
+ })
+
+ if (!liveQuiz) return null
+
+ const storedResponses = liveQuiz.blocks.reduce((acc_b, block) => {
+ acc_b += block.instances.reduce((acc_i, instance) => {
+ acc_i += instance.participants
+ return acc_i
+ }, 0)
+ return acc_b
+ }, 0)
+
+ return {
+ numOfResponses: storedResponses,
+ numOfFeedbacks: liveQuiz._count.feedbacks,
+ numOfConfusionFeedbacks: liveQuiz._count.confusionFeedbacks,
+ numOfLeaderboardEntries: liveQuiz._count.leaderboard,
+ }
+}
+
export async function softDeleteLiveSession(
{ id }: { id: string },
ctx: ContextWithUser
diff --git a/packages/i18n/messages/de.ts b/packages/i18n/messages/de.ts
index 57e2d64f84..516626546c 100644
--- a/packages/i18n/messages/de.ts
+++ b/packages/i18n/messages/de.ts
@@ -1333,10 +1333,24 @@ Da die KlickerUZH-App noch nicht im iOS-App-Store verfügbar ist, folgen Sie die
evaluationResults: 'Auswertung (Resultate)',
abortSession: 'Quiz abbrechen',
confirmAbortSession: 'Live Quiz {title} abbrechen?',
- abortSessionHint:
- 'Beim Abbrechen eines Live Quizzes gehen alle Antworten, Feedbacks, etc. verloren. Das Live Quiz wird zurückgesetzt und kann zu einem späteren Zeitpunkt erneut gestartet werden.',
- abortEnterName:
- 'Bitte bestätigen Sie den Abbruch des Live Quizzes, indem Sie den Namen des Quizzes eingeben.',
+ cancelLiveQuizMessage:
+ 'Bitte bestätigen Sie die Löschung aller Elemente, die mit dieser Live-Quiz verbunden sind, und bestätigen Sie den Abbruch dieses Live-Quiz.',
+ noResponsesToDelete:
+ 'Für dieses Live-Quiz wurden noch keine Antworten gespeichert.',
+ deleteResponses:
+ '{number} Antworten von Studierenden in diesem Live-Quiz werden gelöscht.',
+ noFeedbacksToDelete:
+ 'Für dieses Live-Quiz wurden noch keine Feedbacks abgegeben.',
+ deleteFeedbacks:
+ '{number} Feedbacks im Live-Q&A-Kanal werden unwiderruflich gelöscht.',
+ noConfusionFeedbacksToDelete:
+ 'Für dieses Live-Quiz wurden noch keine Confusion-Feedbacks abgegeben.',
+ deleteConfusionFeedbacks:
+ '{number} Confusion-Feedbacks werden unwiderruflich gelöscht.',
+ noLeaderboardEntriesToDelete:
+ 'Für dieses Live-Quiz wurden noch keine Quiz-Leaderboard-Einträge erstellt.',
+ deleteLeaderboardEntries:
+ 'Alle Quiz-Leaderboard-Einträge werden gelöscht und alle Teilnehmenden verlieren ihre gesammelten Punkte.',
printTitle: 'Session "{name}" - Feedback-Kanal',
lecturerView: 'Dozierendenansicht',
liveQA: 'Live Q&A',
diff --git a/packages/i18n/messages/en.ts b/packages/i18n/messages/en.ts
index 99eeeada9e..7d51f658a8 100644
--- a/packages/i18n/messages/en.ts
+++ b/packages/i18n/messages/en.ts
@@ -1320,10 +1320,24 @@ Since the KlickerUZH app is not yet available on the iOS App Store, follow these
evaluationResults: 'Evaluation (results)',
abortSession: 'Abort quiz',
confirmAbortSession: 'Abort live quiz {title}?',
- abortSessionHint:
- 'When aborting a live quiz, all answers, feedbacks, etc. will be lost. The quiz itself is reverted to the prepared state and can be started again at a later date.',
- abortEnterName:
- 'If you are sure you want to abort the live quiz, please enter the name of the quiz to confirm.',
+ cancelLiveQuizMessage:
+ 'Please confirm the deletion of all elements associated with this live quiz and confirm the irreversible abortion of this live quiz.',
+ noResponsesToDelete:
+ 'For this live quiz no responses have been collected yet.',
+ deleteResponses:
+ '{number} responses in this live quiz submitted by students will be deleted.',
+ noFeedbacksToDelete:
+ 'For this live quiz no feedbacks have been submitted yet.',
+ deleteFeedbacks:
+ '{number} feedbacks in live Q&A channel will be irreversibly deleted.',
+ noConfusionFeedbacksToDelete:
+ 'For this live quiz no confusion feedbacks have been submitted yet.',
+ deleteConfusionFeedbacks:
+ '{number} confusion feedbacks will be irreversibly deleted.',
+ noLeaderboardEntriesToDelete:
+ 'For this live quiz no quiz leaderboard entries have been created yet.',
+ deleteLeaderboardEntries:
+ '{number} quiz leaderboard entries will be deleted and all participants will loose their collected points.',
printTitle: 'Live Quiz "{name}" - Feedback Channel',
lecturerView: 'Lecturer View',
liveQA: 'Live Q&A',
@@ -1510,7 +1524,7 @@ Since the KlickerUZH app is not yet available on the iOS App Store, follow these
hideArchive: 'Hide archive',
deleteCourse: 'Delete course',
courseDeletionMessage:
- 'Please confirm all the deletion of all elements associated with this course and confirm the irreversible deletion of the course. Note that all students will loose access to the course alongside all associated course materials and activities.',
+ 'Please confirm the deletion of all elements associated with this course and the irreversible deletion of the course. Note that all students will loose access to the course alongside all associated course materials and activities.',
noParticipationsToDelete: 'This course contains no participations.',
deleteParticipations:
'{number} participants of this course will loose their collected points and access to all course materials and activities.',