{% macro display_star(grade) -%}

  {% if grade >= 0 %}
    {% for i in range(5) %}
      {% if i <= grade %}
        <span class="fa-solid fa-star pedagogy star-checked grade-with-star"></span>
      {% else %}
        <span class="fa-solid fa-star pedagogy star-not-checked grade-with-star"></span>
      {% endif %}
    {% endfor %}
    <span class="pedagogy grade-without-star">{{ grade }}/5</span>
  {% else %}
    <span class="grade-text"> {% trans %} not rated {% endtrans %} </span>
  {% endif %}

{%- endmacro %}
