chore(frontend): Restore learningpath script

This commit is contained in:
Tibo De Peuter 2025-05-18 10:12:49 +02:00
parent e7119cf28d
commit c7f5f144a5
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2

View file

@ -13,12 +13,12 @@
import authService from "@/services/auth/auth-service.ts";
import { LearningPathNode } from "@/data-objects/learning-paths/learning-path-node.ts";
import LearningPathGroupSelector from "@/views/learning-paths/LearningPathGroupSelector.vue";
import { useQuestionsQuery } from "@/queries/questions";
import { useCreateQuestionMutation, useQuestionsQuery } from '@/queries/questions';
import type { QuestionsResponse } from "@/controllers/questions";
import type { LearningObjectIdentifierDTO } from "@dwengo-1/common/interfaces/learning-content";
import QandA from "@/components/QandA.vue";
import type { QuestionDTO } from "@dwengo-1/common/interfaces/question";
import { useStudentAssignmentsQuery } from "@/queries/students";
import { useStudentAssignmentsQuery, useStudentGroupsQuery } from '@/queries/students';
import type { AssignmentDTO } from "@dwengo-1/common/interfaces/assignment";
import QuestionNotification from "@/components/QuestionNotification.vue";
import QuestionBox from "@/components/QuestionBox.vue";
@ -151,6 +151,15 @@
authService.authState.user?.profile.preferred_username,
);
const loID: LearningObjectIdentifierDTO = {
hruid: props.learningObjectHruid as string,
language: props.language,
};
const createQuestionMutation = useCreateQuestionMutation(loID);
const groupsQueryResult = useStudentGroupsQuery(authService.authState.user?.profile.preferred_username);
const questionInput = ref("");
const discussionLink = computed(
() =>
"/discussion" +