{% extends "templates/base.html" %} {% from "www/macros/common_macro.html" import MentorsSection %} {% block title %}{{ course.title }}{% endblock %} {% block head_include %} {% endblock %} {% block content %}
Courses / {{ course.title }}

{{course.title}}

{% if not course.disable_self_learning and not membership %}
{% endif %}
{{ course.short_introduction }}
{{ CourseVideo(course) }} {{ CourseDescription(course) }} {{ widgets.InstructorSection(instructor=course.get_instructor()) }} {{ BatchSection(course) }} {{ widgets.CourseOutline(course=course, show_link=membership) }} {{ widgets.Reviews(course=course, membership=membership) }}
{% endblock %} {% macro CourseVideo(course) %} {% if course.video_link %}
{% endif %} {% endmacro %} {% macro CourseDescription(course) %}

Course Description

{{ frappe.utils.md_to_html(course.description) }}
{% endmacro %} {% macro BatchSection(course) %}
{% if course.is_mentor(frappe.session.user) %} {{ BatchSectionForMentors(course, course.get_batches(mentor=frappe.session.user)) }} {% else %} {{ BatchSectionForStudents(course, course.get_upcoming_batches()) }} {% endif %}
{% endmacro %} {% macro BatchSectionForMentors(course, mentor_batches) %}

Your Batches

{% if mentor_batches %}
{% for batch in mentor_batches %}
{{ widgets.RenderBatch(course=course, batch=batch, can_manage=True) }}
{% endfor %}
Add a new batch {% else %}

You are a mentor for this course.

Create your first batch
{% endif %} {% endmacro %} {% macro BatchSectionForStudents(course, upcoming_batches) %} {% if upcoming_batches %}

Upcoming Batches

{% for batch in upcoming_batches %}
{{ widgets.RenderBatch(course=course, batch=batch, can_join=True) }}
{% endfor %}
{% else %}
There are no Upcoming Batches for this course currently.
{% endif %}
{% endmacro %}