diff --git a/client/src/pages/competence/CompetenceCertificateComponent.vue b/client/src/pages/competence/CompetenceCertificateComponent.vue index 097acafc..201637a7 100644 --- a/client/src/pages/competence/CompetenceCertificateComponent.vue +++ b/client/src/pages/competence/CompetenceCertificateComponent.vue @@ -3,7 +3,6 @@ import * as log from "loglevel"; import type { CompetenceCertificate } from "@/types"; import CompetenceAssignmentRow from "@/pages/competence/CompetenceAssignmentRow.vue"; import { computed } from "vue"; -import type { StatusCount } from "@/components/ui/ItProgress.vue"; import ItProgress from "@/components/ui/ItProgress.vue"; import { assignmentsMaxEvaluationPoints, diff --git a/client/src/pages/learningPath/learningContentPage/blocks/EdoniqTestBlock.vue b/client/src/pages/learningPath/learningContentPage/blocks/EdoniqTestBlock.vue index 478b75e1..40c95cbe 100644 --- a/client/src/pages/learningPath/learningContentPage/blocks/EdoniqTestBlock.vue +++ b/client/src/pages/learningPath/learningContentPage/blocks/EdoniqTestBlock.vue @@ -2,10 +2,17 @@ import { useTranslation } from "i18next-vue"; import ItCheckbox from "@/components/ui/ItCheckbox.vue"; import LearningContentSimpleLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentSimpleLayout.vue"; -import type { LearningContentEdoniqTest } from "@/types"; -import { ref } from "vue"; +import type { + Assignment, + AssignmentCompletion, + LearningContentEdoniqTest, +} from "@/types"; +import { computed, ref } from "vue"; import * as log from "loglevel"; import { itPost } from "@/fetchHelpers"; +import { useQuery } from "@urql/vue"; +import { ASSIGNMENT_COMPLETION_QUERY } from "@/graphql/queries"; +import { useCurrentCourseSession } from "@/composables"; const { t } = useTranslation(); @@ -13,6 +20,29 @@ const props = defineProps<{ content: LearningContentEdoniqTest; }>(); +const courseSession = useCurrentCourseSession(); + +const queryResult = useQuery({ + query: ASSIGNMENT_COMPLETION_QUERY, + variables: { + courseSessionId: courseSession.value.id.toString(), + assignmentId: props.content.content_assignment_id.toString(), + learningContentId: props.content.id.toString(), + }, +}); + +const assignment = computed( + () => queryResult.data.value?.assignment as Assignment | undefined +); +const assignmentCompletion = computed( + () => + queryResult.data.value?.assignment_completion as AssignmentCompletion | undefined +); + +const completionStatus = computed(() => { + return assignmentCompletion.value?.completion_status ?? "IN_PROGRESS"; +}); + const termsAccepted = ref(false); const extendedTimeTest = ref(false); @@ -33,45 +63,55 @@ async function startTest() { :learning-content="props.content" > -
-

- -
- -
-
- +
+
+
+ {{ $t("a.Bewertung") }}: + {{ assignmentCompletion?.evaluation_points }} + {{ $t("assignment.von x Punkten", { x: assignment?.max_points }) }} +
+
Ergebnisse abgeben, Bewertung ausstehend
+
+

-
- +
+ +
+
+ +
+ +
+ +