{% from 'utils.html.twig' import ico, imgUpload %}
{% if courseTestimonials|length > 0 and getConfig('allow_testimonial') == enum('CourseEnum::YES') %}
<section class="pag-sec {% if section is defined and section.background %} sec-bg-alt {% endif %}">
{% if layout == 'home' %}
<header class="tit-sec tx-centro container">
<i class="fas fa-quote-left"></i>
<h2>{{ getLanguage('who_has_studied', 'home') }}</h2>
<span class="sub">{{ getLanguage('see_what_they_say', 'home') }}</span>
</header>
{% endif %}
<div class="testimonials layout--{{ layout }}">
<div class="slider-wid">
<div class="js--slider testimonials-slider" id="students-testimonials-{{ layout }}" data-slider-options-label="students-testimonials-{{ layout }}">
{% for courseTestimonial in courseTestimonials %}
<div>
<div class="testimonial">
<div data-testimonial="{{ courseTestimonial.id }}" class="desc">
<p>{{ courseTestimonial.testimonial }}</p>
</div>
<div class="autor">
<div class="foto">
{{ imgUpload(courseTestimonial.userPhoto, enum('AbstractEnum::PATH_PROFILES'), 'profile', courseTestimonial.userName) }}
</div>
<p class="nome">{{ courseTestimonial.userName }}</p>
{% include 'website/includes/stars.html.twig' with { score: courseTestimonial.score, halfs: false } %}
</div>
</div>
</div>
{% endfor %}
</div>
{# SLIDER ARROWS #}
{% include 'website/includes/seta-banner.html.twig' with { id: 'students-testimonials-'~layout } %}
</div>
</div>
</section>
{% endif %}