{% set need_fill = namespace(found=false) %}
{% set need_ds = namespace(found=false) %}
{% if data[c] != None %}
{% for grade in data[c][p] %}
{% for student in data[c][p][grade] %}
{{grade}}
{{ student }}
{{ data[c][p][grade][student]['name'] }}
{{ data[c][p][grade][student]['ename'] }}
{% if data[c][p][grade][student]['status'] == 'L' %}
𝜑 {{data[c][p][grade][student]['note']}}
{% elif data[c][p][grade][student]['status'] == 'K' %}
礦 {{data[c][p][grade][student]['note']}}
{% elif data[c][p][grade][student]['status'] == 'G' %}
事 {{data[c][p][grade][student]['note']}}
{% elif data[c][p][grade][student]['status'] == 'S' %}
病 {{data[c][p][grade][student]['note']}}
{% elif data[c][p][grade][student]['status'] == 'F' %}
喪 {{data[c][p][grade][student]['note']}}
{% elif data[c][p][grade][student]['status'] == 'P' %}
疫 {{data[c][p][grade][student]['note']}}
{% elif data[c][p][grade][student]['status'] == 'O' %}
公 {{data[c][p][grade][student]['note']}}
{% elif data[c][p][grade][student]['status'] == '--' %}
{% elif data[c][p][grade][student]['status'] == 'present' %}
{% else %}
{% set need_fill.found = true %}
{% endif %}
{% if data[c][p][grade][student]['needDS'] == True %}
{% set need_ds.found = true %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% if need_fill.found %}