blob: f38e65246ba0bd5f2ca90ec1bb00cb7a4beaf748 [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.program = get_program(frappe.form_dict['name'])
10
11def get_program(program_name):
12 try:
13 return frappe.get_doc('Program', program_name)
14 except frappe.DoesNotExistError:
15 frappe.throw(_("Program {0} does not exist.".format(program_name)))