{% extends "bee_django_course/base.html" %}
{% load bootstrap3 %}
{% load bee_django_course_filter %}
{% block content %}
    <h3>学生：{{ user|get_name_detail:True|safe }}</h3>

    <table class="table">
        <thead>
        <tr>
            <th>课程</th>
            <th>课件</th>
            <th>状态</th>
            <th>查看</th>
        </tr>
        </thead>
        <tbody>
        {% for e in assignments %}
            <tr>
                <td>{{ e.user_course.course.name }}</td>
                <td>{{ e.section.name }}</td>
                <td>
                    {% if e.is_learning %}
                        学习中
                    {% elif e.is_rejected %}
                        退回重修
                    {% elif e.is_passed %}
                        已通过
                    {% elif e.is_submit %}
                        已提交
                    {% else %}
                        未开始
                    {% endif %}
                </td>
                <td>
                    <a href="{% url 'bee_django_course:manage_user_assignment' ucs_id=e.id %}">查看</a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    {% load bootstrap_pagination %}
    {% bootstrap_paginate assignments range=10 %}

{% endblock content %}