{% extends "lms/templates/lms_base.html" %} {% block title %} {{ course.title if course.title else _("New Course") }} {% endblock %} {% block page_content %}
{{ CourseHomeHeader(course) }}
{{ CourseHeaderOverlay(course) }} {{ Description(course) }} {{ widgets.CourseOutline(course=course, membership=membership, is_user_interested=is_user_interested) }} {% if course.status == "Approved" and not frappe.utils.cint(course.upcoming) %} {% include "lms/templates/reviews.html" %} {% endif %}
{% endblock %} {% macro CourseHomeHeader(course) %}
{{ BreadCrumb(course) }} {{ CourseCardWide(course) }}
{% endmacro %} {% macro BreadCrumb(course) %} {% endmacro %} {% macro CourseCardWide(course) %}
{% for tag in get_tags(course.name) %}
{{ tag }}
{% endfor %}
{% if course.title %} {{ course.title }} {% endif %}
{% if course.short_introduction %} {{ course.short_introduction }} {% endif %}
{% if not course.upcoming %}
{% for i in [1, 2, 3, 4, 5] %} {% endfor %}
{% endif %}
{{ _("Instructors") }}:
{% for instructor in get_instructors(course.name) %}
{{ widgets.Avatar(member=instructor, avatar_class="avatar-small") }} {{ instructor.full_name }}
{% endfor %}
{% if membership %} {% set progress = frappe.utils.cint(membership.progress) %}
{{ progress }}% {{ _("Completed") }}
{% endif %} {% endmacro %} {% macro CourseHeaderOverlay(course) %}
{% if course.video_link %} {% endif %}
{{ CTASection(course, membership) }}
{{ Notes(course) }}
{{ format_number(get_students(course.name) | length) }} {{ _("Enrolled") }}
{{ get_lessons(course.name, None, False) }} {{ _("Lessons") }}
{% endmacro %} {% macro Description(course) %}
{{ course.description }}
{% endmacro %} {% macro RelatedCourses(course) %} {% if course.related_courses | length %} {% endif %} {% endmacro %} {% macro CTASection(course, membership) %} {% set lesson_index = get_lesson_index(membership.current_lesson) if membership and membership.current_lesson else "1.1" if first_lesson_exists(course.name) else None %}
{% if is_instructor(course.name) and not course.published and course.status != "Under Review" %}
{{ _("Submit for Review") }}
{% elif is_instructor(course.name) and lesson_index %} {{ _("Checkout Course") }} {% elif course.upcoming and not is_user_interested and not is_instructor(course.name) %}
{{ _("Notify me when available") }}
{% elif is_cohort_staff(course.name, frappe.session.user) %} {{ _("Manage Cohorts") }} {% elif membership %} {{ _("Continue Learning") }} {% elif course.paid_course %} {{ _("Buy This Course") }} {% elif show_start_learing_cta(course, membership) %}
{{ _("Start Learning") }}
{% endif %} {% set progress = frappe.utils.cint(membership.progress) %} {% if membership and course.enable_certification %} {% if certificate %} {{ _("Get Certificate") }} {% elif course.grant_certificate_after == "Completion" and progress == 100 %}
{{ _("Get Certificate") }}
{% endif %} {% endif %} {% if is_instructor(course.name) or has_course_moderator_role() %} {{ _("Edit") }} {% endif %}
{% endmacro %} {% macro Notes(course) %}
{{ _("You have opted to be notified for this course. You will receive an email when the course becomes available.") }}
{% if course.status == "Under Review" and is_instructor(course.name) %}
{{ _("This course is currently under review. Once the review is complete, the System Admins will publish it on the website.") }}
{% endif %} {% if no_of_attempts and no_of_attempts >= course.max_attempts %}

{{ _("You have exceeded the maximum number of attempts allowed to appear for evaluations of this course.") }}

{% endif %} {% endmacro %}