diff --git a/src/components/High/TicketSubmission.tsx b/src/components/High/TicketSubmission.tsx index 5671e738..3ff0ccb3 100644 --- a/src/components/High/TicketSubmission.tsx +++ b/src/components/High/TicketSubmission.tsx @@ -1,5 +1,6 @@ import {Ticket, TicketType, TicketTypeLabel} from "@/interfaces/ticket"; import {User} from "@/interfaces/user"; +import useExamStore from "@/stores/examStore"; import axios from "axios"; import {useState} from "react"; import {toast} from "react-toastify"; @@ -20,6 +21,8 @@ export default function TicketSubmission({user, page, onClose}: Props) { const [description, setDescription] = useState(""); const [isLoading, setIsLoading] = useState(false); + const examState = useExamStore((state) => state); + const submit = () => { if (!type) return toast.error("Please choose a type!", {toastId: "missing-type"}); if (subject.trim() === "") @@ -48,6 +51,18 @@ export default function TicketSubmission({user, page, onClose}: Props) { type, reportedFrom: page, description, + examInformation: + page.includes("exam") || page.includes("exercises") + ? { + exam: examState.exam?.id || "", + exams: examState.exams.map((x) => x.id), + exerciseIndex: examState.exerciseIndex, + moduleIndex: examState.moduleIndex, + partIndex: examState.partIndex, + questionIndex: examState.questionIndex, + selectedModules: examState.selectedModules, + } + : undefined, }; axios diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 2d0d3613..e6a44605 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -75,7 +75,7 @@ export default function Navbar({user, path, navDisabled = false, focusMode = fal