feat: community member for profile and edit profile form

This commit is contained in:
pateljannat
2021-03-12 12:22:12 +05:30
parent b7602d6d2b
commit 25a0dd02ac
14 changed files with 124 additions and 38 deletions

View File

@@ -6,10 +6,10 @@ def get_context(context):
def get_my_courses():
my_courses = []
courses = frappe.get_all("Community Course Enrollment", {"owner": frappe.session.user}, ["course"])
courses = frappe.get_all("LMS Course Enrollment", {"owner": frappe.session.user}, ["course"])
for course in courses:
my_courses.append({
"name": course.course,
"title": frappe.db.get_value("Community Course", course.course, ["title"])
"title": frappe.db.get_value("LMS Course", course.course, ["title"])
})
return my_courses