@frappe.whitelist()
def get_course_schedule_events(start, end, filters=None):
 from frappe.desk.calendar import get_event_conditions
 conditions = get_event_conditions(u'Course Schedule', filters)
 data = frappe.db.sql(u"select name, course,\n DCTB  DCTB  DCTB timestamp(schedule_date, from_time) as from_datetime,\n DCTB  DCTB  DCTB timestamp(schedule_date, to_time) as to_datetime,\n DCTB  DCTB  DCTB room, student_group, 0 as 'allDay'\n DCTB  DCTB from `tabCourse Schedule`\n DCTB  DCTB where ( schedule_date between %(start)s and %(end)s )\n DCTB  DCTB {conditions}".format(conditions=conditions), {u'start': start, u'end': end}, as_dict=True, update={u'allDay': 0})
 return data

@ frappe . whitelist ( ) def get_course_schedule_events ( start , end , filters = None ) : from frappe . desk . calendar import get_event_conditions conditions = get_event_conditions ( u'Course Schedule' , filters ) data = frappe . db . sql ( u"select name, course,\n DCTB  DCTB  DCTB timestamp(schedule_date, from_time) as from_datetime,\n DCTB  DCTB  DCTB timestamp(schedule_date, to_time) as to_datetime,\n DCTB  DCTB  DCTB room, student_group, 0 as 'allDay'\n DCTB  DCTB from `tabCourse Schedule`\n DCTB  DCTB where ( schedule_date between %(start)s and %(end)s )\n DCTB  DCTB {conditions}" . format ( conditions = conditions ) , { u'start' : start , u'end' : end } , as_dict = True , update = { u'allDay' : 0 } ) return data
returns events for course schedule calendar view rendering .