blob: c35fff2e2b833c3ffb93dc299a46aa37804b092e [file] [log] [blame]
Shivam Mishra823c7952019-05-19 16:01:45 +05301from __future__ import unicode_literals
Chillar Anand915b3432021-09-02 16:44:59 +05302
Shivam Mishra823c7952019-05-19 16:01:45 +05303import frappe
4
Chillar Anand915b3432021-09-02 16:44:59 +05305import erpnext.education.utils as utils
6
Shivam Mishra823c7952019-05-19 16:01:45 +05307no_cache = 1
8
9def get_context(context):
10 context.education_settings = frappe.get_single("Education Settings")
Shivam Mishrab7874152019-05-29 15:15:59 +053011 if not context.education_settings.enable_lms:
12 frappe.local.flags.redirect_location = '/'
13 raise frappe.Redirect
Shivam Mishra823c7952019-05-19 16:01:45 +053014 context.featured_programs = get_featured_programs()
15
16
17def get_featured_programs():
Ankush Menat4551d7d2021-08-19 13:41:10 +053018 return utils.get_portal_programs() or []