From 50fe94e47be2a5dcb3a068a309984a933cc70583 Mon Sep 17 00:00:00 2001 From: Fahid Latheef Alungal Date: Sun, 16 Feb 2025 16:08:35 +0530 Subject: [PATCH 1/6] fix: fix yarn dev not working due to const variable re-assignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was causing this error ✘ [ERROR] Cannot assign to "isLoggedIn" because it is a constant src/router.js:230:2: 230 │ isLoggedIn = false ╵ ~~~~~~~~~~ The symbol "isLoggedIn" was declared a constant here: src/router.js:222:7: 222 │ const { isLoggedIn } = sessionStore() ╵ ^ --- frontend/src/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/router.js b/frontend/src/router.js index a6d02f73..742d48d4 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -219,7 +219,7 @@ let router = createRouter({ router.beforeEach(async (to, from, next) => { const { userResource } = usersStore() - const { isLoggedIn } = sessionStore() + let { isLoggedIn } = sessionStore() const { allowGuestAccess } = useSettings() try { From 54047e3c2c8cd47867d08ca33a908f17608d4366 Mon Sep 17 00:00:00 2001 From: Fahid Latheef Alungal Date: Sun, 16 Feb 2025 16:10:14 +0530 Subject: [PATCH 2/6] fix: fix spelling typo Maximun Attempts -> Maximum Attempts --- frontend/src/pages/QuizForm.vue | 2 +- lms/locale/ar.po | 2 +- lms/locale/bs.po | 2 +- lms/locale/de.po | 2 +- lms/locale/eo.po | 2 +- lms/locale/es.po | 2 +- lms/locale/fa.po | 2 +- lms/locale/fr.po | 2 +- lms/locale/hu.po | 2 +- lms/locale/main.pot | 2 +- lms/locale/pl.po | 2 +- lms/locale/ru.po | 2 +- lms/locale/sv.po | 2 +- lms/locale/tr.po | 2 +- lms/locale/zh.po | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/src/pages/QuizForm.vue b/frontend/src/pages/QuizForm.vue index b8f66df6..c143d2aa 100644 --- a/frontend/src/pages/QuizForm.vue +++ b/frontend/src/pages/QuizForm.vue @@ -55,7 +55,7 @@ Date: Sun, 16 Feb 2025 18:19:14 +0530 Subject: [PATCH 3/6] fix: fixed incomplete router initialization in Quiz.vue which was allowing user to submit quiz multiple times --- frontend/src/utils/quiz.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/utils/quiz.js b/frontend/src/utils/quiz.js index e391bc30..4781ba70 100644 --- a/frontend/src/utils/quiz.js +++ b/frontend/src/utils/quiz.js @@ -4,6 +4,7 @@ import { createApp, h } from 'vue' import { usersStore } from '../stores/user' import translationPlugin from '../translation' import { CircleHelp } from 'lucide-vue-next' +import router from '@/router' export class Quiz { constructor({ data, api, readOnly }) { @@ -46,6 +47,7 @@ export class Quiz { quiz: quiz, }) app.use(translationPlugin) + app.use(router) const { userResource } = usersStore() app.provide('$user', userResource) app.mount(this.wrapper) From 8b1058e5777e15520f91376b810d72840802d2c1 Mon Sep 17 00:00:00 2001 From: Fahid Latheef Alungal Date: Sun, 16 Feb 2025 18:27:38 +0530 Subject: [PATCH 4/6] fix: fixed issue in which submissions are not reflected gracefully until page reload ListView throws error if initialized without emptyState which was causing the component to not reload when number of submissions was 0. --- frontend/src/components/Quiz.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Quiz.vue b/frontend/src/components/Quiz.vue index b925cb7f..149e1f4b 100644 --- a/frontend/src/components/Quiz.vue +++ b/frontend/src/components/Quiz.vue @@ -258,14 +258,22 @@
From e374ae3229e774f3c1bfcccd3bb7e3d303f2cdd8 Mon Sep 17 00:00:00 2001 From: Fahid Latheef Alungal Date: Sun, 16 Feb 2025 18:28:48 +0530 Subject: [PATCH 5/6] fix: fixed spelling nextQuetion -> nextQuestion --- frontend/src/components/Quiz.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Quiz.vue b/frontend/src/components/Quiz.vue index 149e1f4b..c0de8ff5 100644 --- a/frontend/src/components/Quiz.vue +++ b/frontend/src/components/Quiz.vue @@ -207,7 +207,7 @@