From acec382dfe2801246734b0cf0ae7e5fc14ec32ef Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 14 Jul 2025 11:40:55 +0530 Subject: [PATCH] fix: quiz progress issue --- frontend/components.d.ts | 1 - frontend/src/components/Quiz.vue | 2 + frontend/src/pages/CourseDetail.vue | 1 + .../lms_assignment_submission.json | 44 +++++++++++++++++-- lms/lms/utils.py | 2 + 5 files changed, 46 insertions(+), 4 deletions(-) diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 69c2583d..3de0da5d 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -23,7 +23,6 @@ declare module 'vue' { BadgeAssignments: typeof import('./src/components/Settings/BadgeAssignments.vue')['default'] BadgeForm: typeof import('./src/components/Settings/BadgeForm.vue')['default'] Badges: typeof import('./src/components/Settings/Badges.vue')['default'] - Bagdes: typeof import('./src/components/Settings/Bagdes.vue')['default'] BatchCard: typeof import('./src/components/BatchCard.vue')['default'] BatchCourseModal: typeof import('./src/components/Modals/BatchCourseModal.vue')['default'] BatchCourses: typeof import('./src/components/BatchCourses.vue')['default'] diff --git a/frontend/src/components/Quiz.vue b/frontend/src/components/Quiz.vue index 0d324b77..3751dc7b 100644 --- a/frontend/src/components/Quiz.vue +++ b/frontend/src/components/Quiz.vue @@ -648,6 +648,8 @@ const getInstructions = (question) => { const markLessonProgress = () => { let pathname = window.location.pathname.split('/') + if (!pathname.includes('courses')) + pathname = window.parent.location.pathname.split('/') if (pathname[2] != 'courses') return let lessonIndex = pathname.pop().split('-') diff --git a/frontend/src/pages/CourseDetail.vue b/frontend/src/pages/CourseDetail.vue index 0ac00c77..f57c435e 100644 --- a/frontend/src/pages/CourseDetail.vue +++ b/frontend/src/pages/CourseDetail.vue @@ -78,6 +78,7 @@ :title="__('Course Outline')" :courseName="course.data.name" :showOutline="true" + :getProgress="course.data.membership ? true : false" />