From 87df23b52d2a675846021c20bfb24be02fe9b170 Mon Sep 17 00:00:00 2001 From: scmmishra Date: Sun, 9 Dec 2018 19:57:12 +0530 Subject: [PATCH] Added quiz card on profile page --- .../js/education/lms/components/ScoreCard.vue | 48 ++++++++++++++++--- .../js/education/lms/pages/ProfilePage.vue | 2 +- erpnext/www/lms.py | 3 +- 3 files changed, 45 insertions(+), 8 deletions(-) diff --git a/erpnext/public/js/education/lms/components/ScoreCard.vue b/erpnext/public/js/education/lms/components/ScoreCard.vue index 523f4ac222..5a6aee53cd 100644 --- a/erpnext/public/js/education/lms/components/ScoreCard.vue +++ b/erpnext/public/js/education/lms/components/ScoreCard.vue @@ -2,22 +2,58 @@
-
-
ECP2018 > Introduction Quiz
- - Courses - +
+
+
+
{{ quizData.program }}
+
+
{{ attempt.content }} + - {{ attempt.score }} - {{attempt.result }} + - Unattempted +
+
+
+
+
+ + Go To Program + +
diff --git a/erpnext/public/js/education/lms/pages/ProfilePage.vue b/erpnext/public/js/education/lms/pages/ProfilePage.vue index 0177df833c..f7399b9778 100644 --- a/erpnext/public/js/education/lms/pages/ProfilePage.vue +++ b/erpnext/public/js/education/lms/pages/ProfilePage.vue @@ -5,7 +5,7 @@ - +
diff --git a/erpnext/www/lms.py b/erpnext/www/lms.py index 822c130f39..c0cc6fad74 100644 --- a/erpnext/www/lms.py +++ b/erpnext/www/lms.py @@ -259,8 +259,9 @@ def get_quiz_progress(program_name): course_enrollment = utils.get_course_enrollment(course.course) meta = get_course_progress(course_enrollment) for progress_item in meta: + # if progress_item['content_type'] == "Quiz" and progress_item['is_complete'] == True: if progress_item['content_type'] == "Quiz": - progress_item['course'] = course.course + progress_item['course'] = course.course_name progress_list.append(progress_item) quiz_meta.quiz_attempt = progress_list quiz_meta.name = program_name