{% if courses.enrolled.any? %}
  {% assign in_progress_courses = courses.enrolled | map: "progress" %}
  {% assign any_not_in_progress = false %}

  {% for in_progress_course in in_progress_courses %}
    {% if in_progress_course == 0 %}
      {% assign any_not_in_progress = true %}
    {% endif %}
  {% endfor %}

  {% if any_not_in_progress %}
    {% assign any_course = false %}
    <div class="row row-with-thumbnails">
      {% for course in courses.enrolled %}
        {% if course.progress == 0 %}
          {% assign is_course_from_learning_path = false %}
          {% for lp_courses in learning_path_courses %}
            {% for lp_course in lp_courses %}
              {% if lp_course.id == course.id %}
                {% assign is_course_from_learning_path = true %}
              {% endif %}
            {% endfor %}
          {% endfor %}

          {% unless is_course_from_learning_path %}
            <div class="{{ class }}">
              {% include "cards_course" with course %}
            </div>
            {% assign any_course = true %}
          {% endunless %}
        {% endif %}
      {% endfor %}
    </div>
    {% unless any_course %}
      {% include "courses_zero_state", message: "Yikes! You don’t have any Enrolled Courses." %}
    {% endunless %}
  {% else %}
    {% include "courses_zero_state", message: "Yikes! You don’t have any Enrolled Courses." %}
  {% endif %}
{% else %}
  {% include "courses_zero_state", message: "Yikes! You don’t have any Enrolled Courses." %}
{% endif %}
