From 2e4cf02737d221c6e5efb28b75f3f9669d8c5c55 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 8 Oct 2024 12:00:51 +0530 Subject: [PATCH] fix: using google docs viewer to render pdf --- frontend/src/components/Assessments.vue | 2 +- frontend/src/components/LessonContent.vue | 2 +- frontend/src/utils/upload.js | 6 ++++-- lms/lms/doctype/course_lesson/course_lesson.json | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/Assessments.vue b/frontend/src/components/Assessments.vue index bfe429e6..55c849dd 100644 --- a/frontend/src/components/Assessments.vue +++ b/frontend/src/components/Assessments.vue @@ -160,7 +160,7 @@ const getRowRoute = (row) => { } } else { return { - name: 'Quiz', + name: 'QuizPage', params: { quizID: row.assessment_name, }, diff --git a/frontend/src/components/LessonContent.vue b/frontend/src/components/LessonContent.vue index f98f0289..39957f3a 100644 --- a/frontend/src/components/LessonContent.vue +++ b/frontend/src/components/LessonContent.vue @@ -37,7 +37,7 @@ diff --git a/frontend/src/utils/upload.js b/frontend/src/utils/upload.js index 3ceb5ec8..c54cfae4 100644 --- a/frontend/src/utils/upload.js +++ b/frontend/src/utils/upload.js @@ -56,9 +56,11 @@ export class Upload { app.mount(this.wrapper) return } else if (file.file_type == 'PDF') { - this.wrapper.innerHTML = `` + )}&embedded=true" width='100%' height='700px' class="mb-4" type="application/pdf">` return } else { this.wrapper.innerHTML = `