{% if courses.enrolled.any? %}
  {% assign started_courses = courses.enrolled | map: "started?" %}
  {% assign in_progress_courses = courses.enrolled | map: "progress" %}
  {% assign learning_path_courses = learning_paths.enrolled | map: 'items'%}
  {% assign any_started = false %}
  {% assign any_in_progress = false %}

  {% for started_course in started_courses %}
    {% if started_course == true %}
      {% assign any_started = true %}
    {% endif %}
  {% endfor %}

  {% for in_progress_course in in_progress_courses %}
    {% if in_progress_course > 0 and in_progress_course < 100 %}
      {% assign any_in_progress = true %}
    {% endif %}
  {% endfor %}

  {% if any_started and any_in_progress %}
    {% assign any_course = false %}
    <div class="row row-with-thumbnails">
      {% for course in courses.enrolled %}
        {% if course.progress > 0 and course.progress < 100 %}
          {% 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 In Progress Courses." %}  
      {% endunless %}
    {% else %}
      {% include "courses_zero_state", message: "Yikes! You don’t have any In Progress Courses." %}
  {% endif %}
{% else %}
  {% include "courses_zero_state", message: "Yikes! You don’t have any In Progress Courses." %}
{% endif %}
