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

{% if user_part.status != 0 %} {% if user_part.status == 1 %} {{ user_part.part.pre_title|default:"" }} {% elif user_part.status == 2 %} {{ user_part.part.pre_title|default:""}} {{ user_part.part.title }} {% endif %} {% if user_part.status == 2 %}(已观看){% endif %} {% else %} {{ user_part.part.pre_title|default:"" }} {% 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 == 1 %} {{ user_part.part.pre_title|default:"" }} {% elif user_part.status == 2 %} {{ user_part.part.pre_title|default:"" }} {{ user_part.part.title }} {% endif %} {% if user_part.status == 2 %}(已通过){% endif %} {% else %} {{ user_part.part.pre_title|default:"" }} {% 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 %}