{% extends 'base.html' %} {% load static %} {% load widget_tweaks %} {% load crispy_forms_tags %} {% block title %} Home {% endblock title %} {% block content %}

{{ assignment.title }}

{{ assignment.created_by.username }} {{ assignment.created_at }}

{{ assignment.marks }} points

Due {{ assignment.due_date }}


{{ assignment.description }}

{% for resource in assignment.resources %} {% endfor %}

Your Work

{% if submitted_assignment %} {% if submitted_assignment.turned_in %}

Turned In

{% else %}

Assigned

{% endif %} {% else %}

Assigned

{% endif %}
{% if submitted_assignment and submitted_assignment.is_reviewed %}

Graded : {{ submitted_assignment.grade }}

{% endif %} {% if submitted_assignment %} {% if assignment_files %}

Submitted files

{% for file in assignment_files %} {% endfor %} {% endif %} {% if not submitted_assignment.turned_in %}
{% csrf_token %} {{ form | crispy }}
{% csrf_token %}
{% else %}
{% csrf_token %}
{% endif %} {% else %}
{% csrf_token %} {{ form | crispy }}
{% csrf_token %}
{% endif %}
{% for comment in assignment.comments %} {% if is_teacher or comment.user == request.user %}
...

{{ comment.user }}: {{ comment.comment_text}}

{% endif %} {% endfor %}
... {% csrf_token %} {{ private_comment_form.comment_text|attr:"class:form-control rounded-pill"|attr:"placeholder:Add a private comment" }}
{% endblock content %}