{% extends "learning/course/base.html" %} {% load i18n learning django_bootstrap_breadcrumbs %} {% block title %}{{ block.super }} βˆ’ {% blocktrans with name=course.name %}Course β€œ{{ name }}”{% endblocktrans %} {% endblock %} {% block sidebar %} {% include "learning/course/_includes/sidebar.html" %} {% endblock %} {% block breadcrumbs %} {{ block.super }} {% if course.name|length >= 70 %} {% breadcrumb course.name|truncatechars:40 "learning:course/detail" course.slug %} {% else %} {% breadcrumb course.name "learning:course/detail" course.slug %} {% endif %} {% endblock %} {% block learning_content %} {% get_object_perms object user as course_perms %}
{# Course title and permalink #}

{% if course.name|length >= 70 %} {{ course.name|truncatechars:40 }} {% else %} {{ course.name }} {% endif %}

{# Course management buttons #}
{% if not user == course.author and not contribution %} {# Display register or unregister button #} {% if user_can_register %} {% if registration and not registration.registration_locked %} {# The user is a student, he can unregister #} {% include 'learning/course/_includes/details/modals/unregister.html' with course=course %} {% elif registration and registration.registration_locked or user in course.students.all %} {% elif not registration %} {# It’s not already a student so it can register #}
{% csrf_token %}
{% endif %} {# This part is for the course with acces on student-only #} {% elif not user_can_register and user in course.students.all %} {% else %} {% endif %} {% else %} {# Display change and delete buttons #} {% if "change_course" in course_perms %} {% trans "Edit" %} {% endif %} {% if "delete_course" in course_perms %} {% endif %} {% endif %}

{% include "learning/_includes/object_tags_line.html" %}
{% include "learning/_includes/object_language.html" %} {% blocktrans with author=course.author %}Writen by {{ author }}{% endblocktrans %}

{% if user == course.author or contribution%} {% include "learning/course/_includes/details/status_line.html" %}
{% endif %} {% with maxlength=2000 length=course.description|render_markdown|striptags|length %} {% if length > maxlength and "change_course" in course_perms %} {% endif %} {% endwith %}
{{ course.description | render_markdown | safe }}
{# Include the objectives #} {% include "learning/taxonomy/objective/detail/objective_list.html" with objectives=objectives.page_obj object_name='course'%} {% if user_is_teacher %}
{% include "learning/course/_includes/details/teacher_activities_view.html" %} {% endif %} {% endblock %}