fix: profile page fixes and course completion tick

This commit is contained in:
pateljannat
2021-07-15 11:16:01 +05:30
parent ec852fc255
commit 4891be1d8c
15 changed files with 598 additions and 50 deletions

View File

@@ -59,3 +59,12 @@ class CustomUser(User):
filters["member_type"] = member_type
return frappe.get_all("LMS Batch Membership", filters, ["name", "course"])
def get_mentored_courses(self):
""" Returns all courses mentored by this user """
return frappe.get_all("LMS Course Mentor Mapping",
{
"mentor": self.name
},
["name", "course"]
)