From 41c3522285e9ea665f8e42a475043226c4d70e91 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 1 Jan 2024 23:26:53 +0530 Subject: [PATCH] feat: quiz submission --- frontend/src/components/CourseOutline.vue | 6 +- frontend/src/components/Quiz.vue | 330 +++++++++++++++--- frontend/src/main.js | 1 - frontend/src/pages/Lesson.vue | 14 +- lms/lms/doctype/lms_quiz/lms_quiz.py | 11 +- .../lms_quiz_submission.json | 25 +- lms/lms/utils.py | 12 + 7 files changed, 334 insertions(+), 65 deletions(-) diff --git a/frontend/src/components/CourseOutline.vue b/frontend/src/components/CourseOutline.vue index a2365452..0ac83fe1 100644 --- a/frontend/src/components/CourseOutline.vue +++ b/frontend/src/components/CourseOutline.vue @@ -7,13 +7,13 @@ :class="{'rotate-90 transform duration-200' : open, 'duration-200' : !open, 'open': index == 1}" class="h-5 w-5 text-gray-900 stroke-1 mr-2" /> -
+
{{ chapter.title }}
-
+
-
+
diff --git a/frontend/src/components/Quiz.vue b/frontend/src/components/Quiz.vue index dccdc499..acc76b17 100644 --- a/frontend/src/components/Quiz.vue +++ b/frontend/src/components/Quiz.vue @@ -1,83 +1,317 @@ \ No newline at end of file diff --git a/frontend/src/main.js b/frontend/src/main.js index 039cc611..58643569 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -23,7 +23,6 @@ setConfig('resourceFetcher', frappeRequest) app.use(FrappeUI) app.use(pinia) app.use(router) -app.use(resourcesPlugin) app.use(translationPlugin) app.use(pageMetaPlugin) app.provide('$dayjs', dayjs) diff --git a/frontend/src/pages/Lesson.vue b/frontend/src/pages/Lesson.vue index 4208c002..3c0c2414 100644 --- a/frontend/src/pages/Lesson.vue +++ b/frontend/src/pages/Lesson.vue @@ -62,12 +62,12 @@
- -
+ +
- {{ __("Please login to access this quiz.") }} + {{ __("Please login to access the quiz.") }}
-