{{ exam.title }}

科目:{{ exam.subject }} 考试时长:{{ exam.duration }}分钟 满分:{{ exam.total_score }}分 出题人:{{ exam.creator.name if exam.creator else '' }}
姓名: 考号: 得分:
{% set ns = namespace(choice_idx=0, fill_idx=0, text_idx=0) %} {% set choices = [] %} {% set fills = [] %} {% set texts = [] %} {% for q in questions %} {% if q.type == 'choice' %}{% if choices.append(q) %}{% endif %} {% elif q.type == 'fill' %}{% if fills.append(q) %}{% endif %} {% else %}{% if texts.append(q) %}{% endif %} {% endif %} {% endfor %} {% if choices|length > 0 %}
一、选择题(共{{ choices|length }}题)
{% for q in choices %}
{{ loop.index }}. {{ q.content }} ({{ q.score }}分) {% if q.options %}
{% for opt in q.options %}
{{ ['A','B','C','D'][loop.index0] }}. {{ opt }}
{% endfor %}
{% endif %}
{% endfor %} {% endif %} {% if fills|length > 0 %}
二、填空题(共{{ fills|length }}题)
{% for q in fills %}
{{ loop.index }}. {{ q.content }} ({{ q.score }}分)
{% endfor %} {% endif %} {% if texts|length > 0 %}
三、解答题(共{{ texts|length }}题)
{% for q in texts %}
{{ loop.index }}. {{ q.content }} ({{ q.score }}分)
{% for i in range(8) %}
{% endfor %}
{% endfor %} {% endif %}