refactor: added lms utilities for enrollment and program list
diff --git a/erpnext/www/lms/index.py b/erpnext/www/lms/index.py
index 15ca0b4..00f66e7 100644
--- a/erpnext/www/lms/index.py
+++ b/erpnext/www/lms/index.py
@@ -13,15 +13,4 @@
def get_featured_programs():
- featured_program_names = frappe.get_all("Program", filters={"is_published": True, "is_featured": True})
- if featured_program_names:
- featured_list = [utils.get_program_and_enrollment_status(program['name']) for program in featured_program_names]
- return featured_list
- else:
- return get_all_programs()[:2]
-
-def get_all_programs():
- program_names = frappe.get_all("Program", filters={"is_published": True})
- if program_names:
- program_list = [utils.get_program_and_enrollment_status(program['name']) for program in program_names]
- return program_list
+ return utils.get_portal_programs()
\ No newline at end of file