{% if user_part.part.type == 1 %}

{% if user_part.status != 0 %} {{ user_part.part.title }} {% if user_part.status == 2 %}(已观看){% endif %} {% else %} {{ user_part.part.title }} {% if user_part.status == 2 %}(已通过){% endif %} {% endif %}

{% for video in user_part.part.video_set.all %}
{{ video.content | safe }}
{% endfor %}
{% elif user_part.part.type == 2 %}

{% if user_part.status != 0 %} 选择题 {% if user_part.status == 2 %}(已通过){% endif %} {% else %} 选择题 {% if user_part.status == 2 %}(已通过){% endif %} {% endif %}

{% for question in user_part.part.question_set.all %}
{{ question.title }}
{% for option in question.option_set.all %}
{% endfor %}
{% endfor %}
{% endif %}