{% load i18n %}
{% if not hide_header %}
<h4 class="question-title" id="heading_{{ self.html_id }}">{{ self.display_name_with_default }}</h4>
{% endif %}
<fieldset class="rating questionnaire" id="{{ self.html_id }}">
  <legend class="question field-group-hd">{{ self.question|safe }}</legend>
  <div class="choices-list">
    {% for i in '12345' %}
    <div class="choice" aria-live="polite" aria-atomic="true">
      <label class="choice-label"
             for = "{{ i }}radio"
             aria-describedby="feedback_{{ self.html_id }} choice_tips_{{ self.html_id }}-{{ i }}">
        <button class="choice-result fa icon-2x" aria-label=""
              data-label_correct="{% trans "Correct" %}" data-label_incorrect="{% trans "Incorrect" %}"></button>
        <span class="choice-selector">
          <input type="radio" id="{{ i }}radio" name="{{ self.name }}" value="{{i}}"
            {% if self.student_choice == i and not hide_prev_answer %} checked{%else%} data-student-choice='{{self.student_choice}}'{% endif %}
          />
        </span>
        <span class="choice-label-text">
          {{i}}
          {% if i == '1' %} - {{ self.low|safe }}{% endif %}
          {% if i == '5' %} - {{ self.high|safe }}{% endif %}
        </span>
      </label>
      <div class="choice-tips-container">
        <div class="choice-tips" id="choice_tips_{{ self.html_id }}-{{ i }}"></div>
      </div>
    </div>
    {% endfor %}

    {% for choice in custom_choices %}
    <div class="choice" aria-live="polite" aria-atomic="true">
      <label class="choice-label"
             aria-describedby="feedback_{{ self.html_id }} choice_tips_{{ self.html_id }}-{{ forloop.counter }}">
        <button class="choice-result fa icon-2x" aria-label=""
              data-label_correct="{% trans "Correct" %}" data-label_incorrect="{% trans "Incorrect" %}"></button>
        <span class="choice-selector">
          <input type="radio" name="{{ self.name }}" value="{{ choice.value }}"
            {% if self.student_choice == choice.value and not hide_prev_answer %} checked{%else%} data-student-choice='{{self.student_choice}}'{% endif %}
          />
        </span>
        <span class="choice-label-text">{{ choice.content|safe }}</span>
      </label>
      <div class="choice-tips-container">
        <div class="choice-tips" id="choice_tips_{{ self.html_id }}-{{ forloop.counter }}"></div>
      </div>
    </div>
    {% endfor %}
    <div class="feedback" id="feedback_{{ self.html_id }}"></div>
  </div>
</fieldset>
