{% extends "base.html" %} {% block title %}考试详情 - FlashExam{% endblock %} {% block content %}

考试详情

查看具体题目答题情况和得分详情

考试信息
考试名称:{{ exam.title if exam else '未知考试' }}

考试描述:{{ exam.description if exam and exam.description else '无描述' }}

考试时长:{{ exam.duration_minutes if exam else '未知' }} 分钟

开始时间:{{ exam_result.get('start_time', '未知')[:19] if exam_result.get('start_time') else '未知' }}

完成时间:{{ exam_result.get('end_time', '未知')[:19] if exam_result.get('end_time') else '未知' }}

总分: {% if exam_result.get('score', 0) > 0 %} {% set score = exam_result.get('score', 0) %} {% set total_score = exam_result.get('total_score', 100) %} {% set percentage = (score/total_score*100) if total_score > 0 else 0 %} {{ "%.1f"|format(score) }}/{{ "%.1f"|format(total_score) }} ({{ "%.1f"|format(percentage) }}%) {% if percentage >= 90 %} 优秀 {% elif percentage >= 80 %} 良好 {% elif percentage >= 70 %} 中等 {% elif percentage >= 60 %} 及格 {% else %} 不及格 {% endif %} {% else %} 等待评分 {% endif %}

答题详情
{% if question_details %} {% for detail in question_details %}
第{{ detail.get('question_order', loop.index) }}题 ({{ detail.get('question_type', '未知类型') }})
{% if detail.get('score', 0) > 0 or detail.get('is_correct', False) %} {{ "%.1f"|format(detail.get('score', 0)) }}/{{ "%.1f"|format(detail.get('max_score', 1)) }}分 {% else %} 等待评分 {% endif %}
题目:
{{ detail.get('question_text', '题目内容缺失') }}
我的答案:
{% if detail.get('student_answer') %} {% if detail.get('question_type') == 'choice' %} 选项 {{ detail.get('student_answer') }} {% else %} {{ detail.get('student_answer') }} {% endif %} {% else %} 未作答 {% endif %}
参考答案:
{% if detail.get('correct_answer') %} {% if detail.get('question_type') == 'choice' %} 选项 {{ detail.get('correct_answer') }} {% else %} {{ detail.get('correct_answer') }} {% endif %} {% else %} 无参考答案 {% endif %}
{% set is_objective = detail.get('question_type') in ['choice', 'judge'] %} {% if detail.get('is_correct', False) %} 答案正确 {% elif detail.get('score', 0) > 0 %} 部分得分 {% elif is_objective %} 答案错误 {% else %} 等待评分 {% endif %}
{% set type_names = { 'choice': '选择题', 'judge': '判断题', 'essay': '论述题', 'short_answer': '简答题', 'fill_blank': '填空题', 'code_reading': '代码阅读题', 'code_practice': '编程题', 'programming': '编程题' } %} {{ type_names.get(detail.get('question_type', ''), detail.get('question_type', '未知类型')) }}
{% endfor %} {% else %}

无答题详情

暂时无法获取此考试的详细答题情况

{% endif %}
返回成绩列表 {% if exam_result.get('score', 0) > 0 %} {% endif %}
{% endblock %} {% block scripts %} {% endblock %}