blob: 035f7d9f72ccec8cdfcf4230f05f99c566525dc3 [file] [log] [blame]
Shivam Mishra823c7952019-05-19 16:01:45 +05301import frappe
2
Chillar Anand915b3432021-09-02 16:44:59 +05303import erpnext.education.utils as utils
4
Shivam Mishra823c7952019-05-19 16:01:45 +05305no_cache = 1
6
7def get_context(context):
8 context.education_settings = frappe.get_single("Education Settings")
Shivam Mishrab7874152019-05-29 15:15:59 +05309 if not context.education_settings.enable_lms:
10 frappe.local.flags.redirect_location = '/'
11 raise frappe.Redirect
Shivam Mishra823c7952019-05-19 16:01:45 +053012 context.featured_programs = get_featured_programs()
13
14
15def get_featured_programs():
Ankush Menat4551d7d2021-08-19 13:41:10 +053016 return utils.get_portal_programs() or []