From 244b5e445ca052191f9a4b1f009cc71187e22f44 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Fri, 16 Jan 2026 15:59:16 +0530 Subject: [PATCH 1/7] fix: open course and batch from evaluation event modal --- frontend/src/components/Modals/Event.vue | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Modals/Event.vue b/frontend/src/components/Modals/Event.vue index 04804f49..365f0c61 100644 --- a/frontend/src/components/Modals/Event.vue +++ b/frontend/src/components/Modals/Event.vue @@ -22,7 +22,10 @@ -
+
{{ event.course_title }} @@ -30,7 +33,10 @@
-
+
{{ event.batch_title }} @@ -334,7 +340,7 @@ const certificateDetails = createResource({ } }, onError(err) { - certificate.template = defaultTemplate.data.value + certificate.template = defaultTemplate.data?.value }, auto: false, }) @@ -377,6 +383,16 @@ const openCertificate = (certificate) => { ) } +const openLink = (type, name) => { + let url = '' + if (type === 'course') { + url = `/lms/courses/${name}` + } else if (type === 'batch') { + url = `/lms/batches/${name}#students` + } + window.open(url, '_blank') +} + const statusOptions = computed(() => { return [ { From c97a5e813c78661d2ab8899595d3ae3826a4df38 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 19 Jan 2026 11:47:57 +0530 Subject: [PATCH 2/7] fix: only system users can access high level APIs --- frontend/src/components/CourseCardOverlay.vue | 2 +- frontend/src/components/LiveClass.vue | 6 +- .../src/components/UpcomingEvaluations.vue | 2 +- frontend/src/pages/Courses.vue | 2 +- frontend/src/pages/JobForm.vue | 2 +- lms/auth.py | 59 +++++++++++++++++++ lms/hooks.py | 1 + lms/lms/utils.py | 33 ++++++----- 8 files changed, 86 insertions(+), 21 deletions(-) create mode 100644 lms/auth.py diff --git a/frontend/src/components/CourseCardOverlay.vue b/frontend/src/components/CourseCardOverlay.vue index 2978ef61..a357a747 100644 --- a/frontend/src/components/CourseCardOverlay.vue +++ b/frontend/src/components/CourseCardOverlay.vue @@ -216,7 +216,7 @@ const video_link = computed(() => { function enrollStudent() { if (!user.data) { - toast.success(__('You need to login first to enroll for this course')) + toast.warning(__('You need to login first to enroll for this course')) setTimeout(() => { window.location.href = `/login?redirect-to=${window.location.pathname}` }, 500) diff --git a/frontend/src/components/LiveClass.vue b/frontend/src/components/LiveClass.vue index 3ee8b91a..fffbd23a 100644 --- a/frontend/src/components/LiveClass.vue +++ b/frontend/src/components/LiveClass.vue @@ -107,7 +107,11 @@ v-model:reloadLiveClasses="liveClasses" /> - +