feat: Added ChapterTeaser widget

This commit is contained in:
Anand Chitipothu
2021-05-03 06:17:56 +05:30
parent a52a01ef7f
commit 62cfc0fb24
4 changed files with 32 additions and 22 deletions

View File

@@ -29,11 +29,11 @@ def get_course(slug):
course = frappe.db.get_value("LMS Course", {"slug": slug},
["name", "slug", "title", "description", "short_introduction", "video_link", "owner"], as_dict=1)
course["topics"] = frappe.db.get_all("LMS Topic",
course["chapters"] = frappe.db.get_all("Chapter",
filters={
"course": course["name"]
},
fields=["name", "slug", "title", "preview"],
fields=["name", "title", "description"],
order_by="creation"
)
return course