feat: course creation resources

This commit is contained in:
Jannat Patel
2024-03-01 10:57:31 +05:30
parent 8f504a8043
commit 80e9984db0
6 changed files with 365 additions and 164 deletions
+9
View File
@@ -267,3 +267,12 @@ def get_chart_details():
)
details.lesson_completions = frappe.db.count("LMS Course Progress")
return details
@frappe.whitelist()
def get_file_info(file_url):
"""Get file info for the given file URL."""
file_info = frappe.db.get_value(
"File", {"file_url": file_url}, ["file_name", "file_size", "file_url"], as_dict=1
)
return file_info