blob: aa10e2b039a90295895da07c12871daf246bbedd [file] [log] [blame]
Shivam Mishra823c7952019-05-19 16:01:45 +05301from __future__ import unicode_literals
2import erpnext.education.utils as utils
3import frappe
4
5no_cache = 1
6
7def get_context(context):
8 context.education_settings = frappe.get_single("Education Settings")
9 context.all_programs = get_all_programs()
10
11def get_all_programs():
12 program_names = frappe.get_all("Program", filters={"is_published": True})
13 if program_names:
14 program_list = [utils.get_program_and_enrollment_status(program['name']) for program in program_names]
15 return program_list