feat: course cards

This commit is contained in:
Jannat Patel
2023-11-29 12:05:40 +05:30
parent 25bcd10e93
commit 63bcf15900
7 changed files with 906 additions and 35 deletions
+10
View File
@@ -139,3 +139,13 @@ def add_mentor_to_subgroup(subgroup, email):
sg.add_mentor(email)
return {"ok": True}
@frappe.whitelist(allow_guest=True)
def get_courses():
"""Returns the list of courses."""
return frappe.get_all(
"LMS Course",
fields=["name", "title", "short_introduction", "image"],
filters={"published": True},
)