blob: b9aff5c5bd4df7244d8af96778bb255c80934373 [file] [log] [blame]
Shivam Mishrad7e82982019-05-20 11:55:17 +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 course = frappe.get_doc('Course', frappe.form_dict['name'])
Shivam Mishra4991fca2019-05-30 16:37:15 +053010 context.program = frappe.form_dict['program']
Shivam Mishrad7e82982019-05-20 11:55:17 +053011 context.course = course
Shivam Mishra4991fca2019-05-30 16:37:15 +053012 context.topics = course.get_topics()
13 context.has_access = utils.allowed_program_access(context.program)