{% extends "templates/base.html" %} {% from "www/macros/common_macro.html" import MentorsSection %} {% block title %}{{ course.title }} {% endblock %} {% block head_include %} {% endblock %} {% block content %}
{{ widgets.BreadCrumb(course=course) }} {{ CourseCardWide(course) }} {{ CourseOutlineAndCreator(course) }} {{ Mentors(course) }} {{ CourseDescriptionAndOverview(course) }} {{ widgets.Reviews(course=course, membership=membership) }}
{% endblock %} {% macro CourseCardWide(course) %}
{% for tag in course.get_tags() %}
{{ tag }}
{% endfor %}
{{ course.title }}
{{ course.short_introduction }}
{% if not course.disable_self_learning and not membership %}
Start Learning
{% endif %} {% if membership %} {% set lesson_index = course.get_lesson_index(membership.current_lesson) if membership and membership.current_lesson else '1.1' %} Continue Learning {% endif %} {% if course.video_link %}
Watch Video Preview
{% endif %}
{% endmacro%} {% macro CourseOutlineAndCreator(course) %}
{{ widgets.CourseOutline(course=course, membership=membership) }}
Creator
{{ widgets.MemberCard(member=course.get_instructor(), show_course_count=True, dimension_class="member-card-large") }}
{% if course.get_course_progress() %}
Your Progress

Great work so far!

Challenge yourself to complete the lessons and grow professionally.

{{ frappe.utils.rounded(course.get_course_progress()) }}%
{% endif %}
{% endmacro %} {% macro Mentors(course) %} {% if course.get_mentors() | length %}
Mentors
{% for mentor in course.get_mentors() %} {{ widgets.MemberCard(member=mentor, show_course_count=False, dimension_class="member-card-medium") }} {% endfor %}
View all mentors
{% endif %} {% endmacro %} {% macro CourseDescriptionAndOverview(course) %}
Course Description
{{ frappe.utils.md_to_html(course.description) }}
{% set avg_rating = course.get_average_rating() %} {% if course.get_students() | length or avg_rating %}
Overview
{% if course.get_students() | length %}
{{ course.get_students() | length }} Enrolled
{% endif %} {% if avg_rating %}
{{ avg_rating }} Rating
{% endif %}
{% endif %}
{% 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 %}