feat: batch customisations
This commit is contained in:
@@ -77,7 +77,9 @@
|
||||
|
||||
|
||||
{% if batch_info.custom_component %}
|
||||
{{ batch_info.custom_component }}
|
||||
<div class="mt-4">
|
||||
{{ batch_info.custom_component }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -150,6 +152,9 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if custom_tabs_header %}
|
||||
{% include custom_tabs_header %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<div class="border-bottom mb-4"></div>
|
||||
@@ -192,6 +197,10 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if custom_tabs_content %}
|
||||
{% include custom_tabs_content %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -202,17 +211,19 @@
|
||||
{% set assessments = current_student.assessments %}
|
||||
{% set student = current_student %}
|
||||
|
||||
{% if student.name == frappe.session.user %}
|
||||
<button class="btn btn-default btn-sm btn-schedule-eval ml-2 pull-right">
|
||||
{{ _("Schedule Evaluation") }}
|
||||
</button>
|
||||
{% endif %}
|
||||
<div>
|
||||
{% if student.name == frappe.session.user %}
|
||||
<button class="btn btn-default btn-sm btn-schedule-eval ml-2 pull-right">
|
||||
{{ _("Schedule Evaluation") }}
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
<div class="mb-8">
|
||||
{% include "lms/templates/upcoming_evals.html" %}
|
||||
</div>
|
||||
<div class="mb-8">
|
||||
{% include "lms/templates/assessments.html" %}
|
||||
<div class="mb-8">
|
||||
{% include "lms/templates/upcoming_evals.html" %}
|
||||
</div>
|
||||
<div class="mb-8">
|
||||
{% include "lms/templates/assessments.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -421,7 +432,7 @@
|
||||
</header>
|
||||
{{ CreateLiveClass(batch_info) }}
|
||||
{{ LiveClassList(batch_info, live_classes) }}
|
||||
</div>
|
||||
</article>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
@@ -547,10 +558,17 @@
|
||||
|
||||
{%- block script %}
|
||||
{{ super() }}
|
||||
{% if batch_info.custom_script %}
|
||||
<script>
|
||||
{{ batch_info.custom_script }}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
frappe.boot.single_types = []
|
||||
let courses = {{ course_list | json }};
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" href="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.css" />
|
||||
<script src="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.js"></script>
|
||||
{% endblock %}
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user