review-question.html 1.68 KB
{% autoescape %}

{% block question %}
<div class="card border-dark mb-3">

  <h5 class="card-header text-white bg-dark">
    {{ i+1 }}.  {{ q['title'] }}
    <div class="pull-right">
      <small>Classificar&nbsp;</small>
      {% if q['answer'] is not None %}
          <i class="fa fa-check-square-o" aria-hidden="true"></i>
      {% else %}
          <i class="fa fa-square-o" aria-hidden="true"></i>
      {% end %}
    </div>
  </h5>

  <div class="card-body">
    <div id="text">
      {{ q['text'] }}
    </div>

    {% block answer %}{% end %}

    {% if t['show_points'] %}
      <p class="text-right">
        <small>
          (Cotação: {{ q['points'] }} pontos não normalizados)
        </small>
      </p>
    {% end %}

    {% if t['state'] == 'FINISHED' %}
      <div class="card-footer">
        {% if q['grade'] > 0.99 %}
          <p class="text-success">
            <i class="fa fa-thumbs-o-up" aria-hidden="true"></i>
            {{ round(q['grade'] * q['points'] / total_points * 20.0, 2)}}
            pontos<br>
            {{ q['comments'] }}
          </p>
        {% elif q['grade'] > 0.49 %}
          <p class="text-warning">
            <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
            {{ round(q['grade'] * q['points'] / total_points * 20.0, 2) }} 
            pontos<br>
            {{ q['comments'] }}
          </p>
        {% else %}
          <p class="text-danger">
            <i class="fa fa-thumbs-o-down" aria-hidden="true"></i>
            {{ round(q['grade'] * q['points'] / total_points * 20.0, 2) }} 
            pontos<br>
            {{ q['comments'] }}
          </p>
        {% end %}
      </div>
    {% end %}
  </div>

</div>
{% end %}