chore: capture more events for analytics
This commit is contained in:
@@ -103,7 +103,7 @@ def save_progress(lesson: str, course: str, scorm_details: dict = None):
|
||||
)
|
||||
|
||||
progress = get_course_progress(course)
|
||||
capture_progress_for_analytics(progress, course)
|
||||
capture_progress_for_analytics()
|
||||
|
||||
# Had to get doc, as on_change doesn't trigger when you use set_value. The trigger is necessary for badge to get assigned.
|
||||
enrollment = frappe.get_doc("LMS Enrollment", membership)
|
||||
@@ -121,9 +121,8 @@ def save_progress(lesson: str, course: str, scorm_details: dict = None):
|
||||
return progress
|
||||
|
||||
|
||||
def capture_progress_for_analytics(progress, course):
|
||||
if progress in [25, 50, 75, 100]:
|
||||
capture("course_progress", "lms", properties={"course": course, "progress": progress})
|
||||
def capture_progress_for_analytics():
|
||||
capture("course_progress", "lms")
|
||||
|
||||
|
||||
def get_quiz_progress(lesson):
|
||||
|
||||
@@ -19,8 +19,8 @@ class LMSCertificate(Document):
|
||||
self.name = make_autoname("hash", self.doctype)
|
||||
|
||||
def after_insert(self):
|
||||
self.send_certification_email()
|
||||
capture("certificate_issued", "lms")
|
||||
self.send_certification_email()
|
||||
|
||||
def send_certification_email(self):
|
||||
outgoing_email_account = frappe.get_cached_value(
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"grid_page_length": 50,
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2026-02-20 17:40:39.823017",
|
||||
"modified": "2026-02-23 16:21:18.503806",
|
||||
"modified_by": "sayali@frappe.io",
|
||||
"module": "LMS",
|
||||
"name": "LMS Course Review",
|
||||
@@ -65,6 +65,7 @@
|
||||
"export": 1,
|
||||
"if_owner": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "LMS Student",
|
||||
"share": 1,
|
||||
|
||||
Reference in New Issue
Block a user