question.html 1.12 KB
{% autoescape %}

{% block question %}
<div class="card border-dark">
  <h5 class="card-header text-white bg-dark">
    {{ q['number'] }}.  {{ q['title'] }}
    <div class="float-right">
      <small>Classificar&nbsp;</small>
      <input type="checkbox" class="question_disabler" data-size="mini" name="answered-{{i}}" id="answered-{{i}}" checked="">
    </div>
  </h5>
  <div class="card-body bg-light">
    <div id="text">
      {{ md(q['text']) }}
    </div>

    {% block answer %}{% end %}

    <p class="text-right">
      <small>
        {% if q['type'] == 'radio' %}
          (Cotação: {{ -round(q['points']/(len(q['options'])-1), 2) }} a {{ round(q['points'], 2) }} pontos)
        {% elif q['type'] == 'checkbox' %}
          (Cotação: {{ -round(q['points'], 2) }} a {{ round(q['points'], 2) }} pontos)
        {% else %}
          (Cotação: 0 a {{ round(q['points'], 2) }} pontos)
        {% end %}
      </small>
    </p>
  </div>

  {% if show_ref %}
    <div class="card-footer">
      file: <code>{{ q['path'] }}/{{ q['filename'] }}</code><br>
      ref:  <code>{{ q['ref'] }}</code>
    </div>
  {% end %}
</div>
{% end %}