{% import '@ChamiloTheme/Macros/box.html.twig' as macro %} {% autoescape false %} {% if not courses is empty %}
{% for item in courses %} {% set image %} {% if item.category %}
{{ item.category }}
{% endif %} {% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %} {% if item.image != '' %} {{ item.title }} {% else %} {{ 'blackboard.png' | img(48, item.title ) }} {% endif %} {% else %} {% if item.image != '' %} {{ item.title }} {% else %} {{ 'blackboard.png' | img(48, item.title ) }} {% endif %} {% endif %} {% endset %} {% set title %} {% if item.edit_actions != '' %}
{% if item.document == '' %} {% else %}
{{ item.document }}
{% endif %}
{% endif %}
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %} {{ item.title }} {{ item.code_course }} {% else %} {{ item.title }} {{ item.code_course }} {{ item.notifications }} {% if item.is_special_course %} {{ 'klipper.png' | img(22, 'CourseAutoRegister'|get_lang ) }} {% endif %} {% endif %}
{% endset %} {% set content %}
{% if item.teachers|length > 0 %} {% for teacher in item.teachers %} {% set counter = counter + 1 %} {% if counter > 1 %} | {% endif %} {{ teacher.firstname }} {{ teacher.lastname }} {% endfor %} {% endif %}
{% if item.student_info %} {% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
{% if (item.student_info.progress is not null) %} {{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }} {% endif %} {% if (item.student_info.score is not null) %} {{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }} {% endif %} {% if (item.student_info.certificate is not null) %} {{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }} {% endif %}
{% endif %} {% endif %}
{% endset %}
{{ macro.box_course_classic(item.course_id, title, content, image, item.is_special_course) }}
{% endfor %}
{% endif %} {% endautoescape %}