From d93cec374dfcfbc4e06ecd0c7f46da013bcec435 Mon Sep 17 00:00:00 2001 From: scmmishra Date: Wed, 21 Nov 2018 15:21:57 +0530 Subject: [PATCH] Minor UI changes --- .../education/lms/components/CourseCard.vue | 25 ++++++++++++++++--- erpnext/public/js/education/lms/lmsRoot.vue | 5 +++- erpnext/www/lms.py | 2 -- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/erpnext/public/js/education/lms/components/CourseCard.vue b/erpnext/public/js/education/lms/components/CourseCard.vue index 10dc90fd4d..31ca773487 100644 --- a/erpnext/public/js/education/lms/components/CourseCard.vue +++ b/erpnext/public/js/education/lms/components/CourseCard.vue @@ -7,7 +7,11 @@ Course Content @@ -58,14 +62,27 @@ export default { return " hidden" } } + }, + methods: { + iconClass(content_type) { + if(content_type == 'Video') return 'fa fa-play' + if(content_type == 'Article') return 'fa fa-file-text-o' + if(content_type == 'Quiz') return 'fa fa-question-circle-o' + } } }; \ No newline at end of file diff --git a/erpnext/public/js/education/lms/lmsRoot.vue b/erpnext/public/js/education/lms/lmsRoot.vue index 8208deda22..2af74abd8d 100644 --- a/erpnext/public/js/education/lms/lmsRoot.vue +++ b/erpnext/public/js/education/lms/lmsRoot.vue @@ -5,6 +5,9 @@ \ No newline at end of file diff --git a/erpnext/www/lms.py b/erpnext/www/lms.py index 3ef721aa82..01fb323cb0 100644 --- a/erpnext/www/lms.py +++ b/erpnext/www/lms.py @@ -204,9 +204,7 @@ def check_quiz_completion(quiz, enrollment_name): def get_course_meta(course_enrollment): # course_enrollment = frappe.get_doc("Course Enrollment", course_enrollment_name) progress = get_course_progress(course_enrollment) - print(progress) count = sum([act['is_complete'] for act in progress]) - print('Count', count) if count == 0: return {'flag':'Start Course', 'content_type': progress[0]['content_type'], 'content': progress[0]['content']} elif count == len(progress):