diff --git a/lms/patches/v0_0/quiz_submission_result.py b/lms/patches/v0_0/quiz_submission_result.py index 1c932ed9..493144c7 100644 --- a/lms/patches/v0_0/quiz_submission_result.py +++ b/lms/patches/v0_0/quiz_submission_result.py @@ -1,5 +1,6 @@ import frappe + def execute(): frappe.reload_doc("lms", "doctype", "lms_quiz_submission") frappe.reload_doc("lms", "doctype", "lms_quiz_result") diff --git a/lms/www/assignments/assignment.js b/lms/www/assignments/assignment.js index 232c66d8..418e7567 100644 --- a/lms/www/assignments/assignment.js +++ b/lms/www/assignments/assignment.js @@ -32,9 +32,9 @@ const save_assignment = (e) => { e.preventDefault(); if (!["Pass", "Fail"].includes(this.result)) frappe.throw({ - "title": __("Not Graded"), - "message": __("Please grade the assignment.") - }) + title: __("Not Graded"), + message: __("Please grade the assignment."), + }); frappe.call({ method: "lms.lms.doctype.lesson_assignment.lesson_assignment.grade_assignment", args: { diff --git a/lms/www/batch/learn.js b/lms/www/batch/learn.js index ff158611..03686996 100644 --- a/lms/www/batch/learn.js +++ b/lms/www/batch/learn.js @@ -234,6 +234,7 @@ const check_answer = (e = undefined) => { const parse_options = () => { let answer = []; let is_correct = []; + $(".active-question input").each((i, element) => { let correct = parseInt($(element).attr("data-correct")); if ($(element).prop("checked")) { @@ -247,7 +248,7 @@ const parse_options = () => { : add_icon(element, "minus-circle"); } }); - console.log(answer, is_correct) + return [answer, is_correct]; }; diff --git a/lms/www/classes/progress.html b/lms/www/classes/progress.html index 77e32f57..70f89eb4 100644 --- a/lms/www/classes/progress.html +++ b/lms/www/classes/progress.html @@ -79,8 +79,8 @@ {% set submission = frappe.db.get_value("LMS Quiz Submission", filters, ["score", "creation"], as_dict=True) %} {% set total_questions = frappe.db.count("LMS Quiz Question", {"parent": quiz.name}) %} -