feat: batch customisations

This commit is contained in:
Jannat Patel
2023-09-28 19:11:46 +05:30
parent 647a0a8ff1
commit 5918b8be60
3 changed files with 74 additions and 25 deletions

View File

@@ -32,6 +32,7 @@ def get_context(context):
"description",
"medium",
"custom_component",
"custom_script",
"seat_count",
"start_time",
"end_time",
@@ -97,6 +98,13 @@ def get_context(context):
)
context.legends = get_legends()
custom_tabs = frappe.get_hooks("lms_batch_tabs")
if custom_tabs:
context.custom_tabs_header = (custom_tabs.get("header_html")[0],)
context.custom_tabs_content = (custom_tabs.get("content_html")[0],)
context.update(frappe.get_attr(custom_tabs.get("context")[0])())
def get_all_quizzes(batch_name):
filters = {} if has_course_moderator_role() else {"owner": frappe.session.user}