diff --git a/lms/lms/doctype/lms_payment/lms_payment.js b/lms/lms/doctype/lms_payment/lms_payment.js index 11d42cab..b2d03500 100644 --- a/lms/lms/doctype/lms_payment/lms_payment.js +++ b/lms/lms/doctype/lms_payment/lms_payment.js @@ -1,8 +1,14 @@ // Copyright (c) 2023, Frappe and contributors // For license information, please see license.txt -// frappe.ui.form.on("LMS Payment", { -// refresh(frm) { - -// }, -// }); +frappe.ui.form.on("LMS Payment", { + onload(frm) { + frm.set_query("member", function (doc) { + return { + filters: { + ignore_user_type: 1, + }, + }; + }); + }, +}); diff --git a/lms/lms/doctype/lms_quiz/lms_quiz.py b/lms/lms/doctype/lms_quiz/lms_quiz.py index 709cfe34..bbaaabb7 100644 --- a/lms/lms/doctype/lms_quiz/lms_quiz.py +++ b/lms/lms/doctype/lms_quiz/lms_quiz.py @@ -110,6 +110,7 @@ def quiz_summary(quiz, results): "score_out_of": score_out_of, "submission": submission.name, "pass": percentage == quiz_details.passing_percentage, + "percentage": percentage, } diff --git a/lms/lms/utils.py b/lms/lms/utils.py index 473066b4..70f186fc 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -667,10 +667,17 @@ def notify_mentions(doc, topic): subject = _("{0} mentioned you in a comment").format(sender_fullname) template = "mention_template" + if topic.reference_doctype == "LMS Batch": + link = f"/batches/{topic.reference_docname}#discussions" + if topic.reference_doctype == "Course Lesson": + course = frappe.db.get_value("Course Lesson", topic.reference_docname, "course") + lesson_index = get_lesson_index(topic.reference_docname) + link = get_lesson_url(course, lesson_index) + args = { "sender": sender_fullname, "content": doc.reply, - "batch_link": "/batches/" + topic.reference_docname + "#discussions", + "link": link, } for recipient in recipients: diff --git a/lms/templates/emails/mention_template.html b/lms/templates/emails/mention_template.html index ed0ecc4b..f791df47 100644 --- a/lms/templates/emails/mention_template.html +++ b/lms/templates/emails/mention_template.html @@ -7,5 +7,5 @@
\ No newline at end of file diff --git a/lms/templates/quiz/quiz.html b/lms/templates/quiz/quiz.html index 84caaf50..ccbdc9d1 100644 --- a/lms/templates/quiz/quiz.html +++ b/lms/templates/quiz/quiz.html @@ -10,9 +10,6 @@