From 878e4cb3cedb9dbcd5831ae1f5553baef498ff87 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 3 Apr 2020 10:07:44 +0530 Subject: [PATCH] fix: lms quiz type error (#21153) --- erpnext/public/js/education/lms/quiz.js | 2 +- erpnext/www/lms/content.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/education/lms/quiz.js b/erpnext/public/js/education/lms/quiz.js index 52481291e02..91cbbf4d662 100644 --- a/erpnext/public/js/education/lms/quiz.js +++ b/erpnext/public/js/education/lms/quiz.js @@ -29,7 +29,7 @@ class Quiz { this.questions.push(question) this.wrapper.appendChild(question_wrapper); }) - if (data.activity.is_complete) { + if (data.activity && data.activity.is_complete) { this.disable() let indicator = 'red' let message = 'Your are not allowed to attempt the quiz again.' diff --git a/erpnext/www/lms/content.html b/erpnext/www/lms/content.html index 5607c0814d4..cdc71412c48 100644 --- a/erpnext/www/lms/content.html +++ b/erpnext/www/lms/content.html @@ -63,7 +63,7 @@
-

{{ content.name }} ({{ position + 1 }}/{{length}})

+

{{ content.name }} ({{ position + 1 }}/{{length}})

{% endmacro %}