brotherton-erpnext/erpnext/templates/pages/courses.py

19 lines
501 B
Python
Raw Normal View History

2016-07-19 08:47:33 +00:00
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
2016-07-19 08:47:33 +00:00
def get_context(context):
2022-03-28 13:22:46 +00:00
course = frappe.get_doc("Course", frappe.form_dict.course)
2016-07-19 08:47:33 +00:00
sidebar_title = course.name
context.no_cache = 1
context.show_sidebar = True
2022-03-28 13:22:46 +00:00
course = frappe.get_doc("Course", frappe.form_dict.course)
course.has_permission("read")
2016-07-19 08:47:33 +00:00
context.doc = course
context.sidebar_title = sidebar_title
context.intro = course.course_intro