From e99650ecd88eef83fbb0ff5b68e44c39b5e4e790 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Thu, 21 Mar 2024 11:28:09 +0000 Subject: [PATCH 1/3] Removed unused console.logs --- src/components/Exercises/InteractiveSpeaking.tsx | 5 ----- src/components/Sidebar.tsx | 2 -- src/pages/(generation)/SpeakingGeneration.tsx | 2 -- 3 files changed, 9 deletions(-) diff --git a/src/components/Exercises/InteractiveSpeaking.tsx b/src/components/Exercises/InteractiveSpeaking.tsx index ec457592..bd56190d 100644 --- a/src/components/Exercises/InteractiveSpeaking.tsx +++ b/src/components/Exercises/InteractiveSpeaking.tsx @@ -103,7 +103,6 @@ export default function InteractiveSpeaking({ useEffect(() => { if (userSolutions.length > 0 && answers.length === 0) { - console.log(userSolutions); const solutions = userSolutions as unknown as typeof answers; setAnswers(solutions); @@ -112,10 +111,6 @@ export default function InteractiveSpeaking({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [userSolutions, mediaBlob, answers]); - useEffect(() => { - console.log({answers}); - }, [answers]); - useEffect(() => { if (updateIndex) updateIndex(questionIndex); }, [questionIndex, updateIndex]); diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 041aa7a9..3164a27f 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -79,8 +79,6 @@ export default function Sidebar({path, navDisabled = false, focusMode = false, u const {totalAssignedTickets} = useTicketsListener(userId); - useEffect(() => console.log(totalAssignedTickets), [totalAssignedTickets]); - const logout = async () => { axios.post("/api/logout").finally(() => { setTimeout(() => router.reload(), 500); diff --git a/src/pages/(generation)/SpeakingGeneration.tsx b/src/pages/(generation)/SpeakingGeneration.tsx index 1ba762a2..25d3e70d 100644 --- a/src/pages/(generation)/SpeakingGeneration.tsx +++ b/src/pages/(generation)/SpeakingGeneration.tsx @@ -79,8 +79,6 @@ const PartTab = ({ .finally(() => setIsLoading(false)); }; - useEffect(() => console.log(part), [part]); - return (
From 7d83ebc5c598a2eb1a0d6950bf2dc8529c1b834c Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Thu, 21 Mar 2024 16:30:01 +0000 Subject: [PATCH 2/3] Maybe this helps I guess --- src/pages/api/evaluate/interactiveSpeaking.ts | 2 +- src/pages/api/evaluate/speaking.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/api/evaluate/interactiveSpeaking.ts b/src/pages/api/evaluate/interactiveSpeaking.ts index 62e9f53e..bc97a885 100644 --- a/src/pages/api/evaluate/interactiveSpeaking.ts +++ b/src/pages/api/evaluate/interactiveSpeaking.ts @@ -53,7 +53,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) { { solutions, score: { - correct: speakingReverseMarking[backendRequest.data.overall], + correct: speakingReverseMarking[backendRequest.data.overall || 0] || 0, missing: 0, total: 100, }, diff --git a/src/pages/api/evaluate/speaking.ts b/src/pages/api/evaluate/speaking.ts index a299df9e..08a7d4f9 100644 --- a/src/pages/api/evaluate/speaking.ts +++ b/src/pages/api/evaluate/speaking.ts @@ -48,7 +48,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) { { solutions, score: { - correct: speakingReverseMarking[backendRequest.data.overall], + correct: speakingReverseMarking[backendRequest.data.overall || 0] || 0, total: 100, missing: 0, }, From 969698d8b880ee4f63a7e9ef0d1ee834cc5192b9 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Fri, 22 Mar 2024 09:07:36 +0000 Subject: [PATCH 3/3] Updated the PDF report to give the value out of 9.0 --- src/exams/pdf/details/radial.result.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exams/pdf/details/radial.result.tsx b/src/exams/pdf/details/radial.result.tsx index e5aa62db..930f6738 100644 --- a/src/exams/pdf/details/radial.result.tsx +++ b/src/exams/pdf/details/radial.result.tsx @@ -11,7 +11,7 @@ export const RadialResult = ({module, score, total, png}: ModuleScore) => ( {score.toFixed(2)} - out of {total} + out of 9.0 );