{% set need_js = True %} {% set title = g.topic.title + ' – ' + g.course.name %} {% if show_for_user %} {% set title = show_for_user.full_name() + ' – ' + title %} {% endif %} {% extends "base.html" %} {% block body %} {% if g.is_admin %} {% endif %}
(posts visible to all students) {% endif %} {% if g.topic.deadline != None %}
Deadline: {{ g.topic.deadline|reltimeformat }} {% endif %} {% for p in posts %} {% set cls = ['post'] %} {% if seen == None or p.last_change_time() > seen %} {% do cls.append('pnew') %} {% endif %} {% if p.target_uid == -1 %} {% do cls.append('pall') %} {% elif p.author_uid != p.target_uid %} {% do cls.append('pteacher') %} {% endif %}
{%- if g.course.anon_grading and not g.is_teacher and p.author_uid != g.uid and p.author_uid == student_uid -%} Student {{student_uid}} — {% else -%} {{ p.author.full_name() }} — {% endif -%} {% if p.modified != None %} {% set when=p.modified %} modified {% else %} {% set when=p.created %} {% endif %} {{ when|reltimeformat }} {% if g.is_grader and p.author_uid == student_uid and g.topic.deadline != None and when > g.topic.deadline %} (after deadline) {% endif %} {% if g.is_teacher or p.author_uid == g.uid %} — edit {% endif %} — reply {% if p.comment != None %}
{{ p.comment }}
Attachment ({{ p.attachment.split('.')[-1] }}) {% if g.inline_att and p.attachment.endswith('.pdf') %}
{% endif %} {% endif %} {% if p.points != None %}Points: {{ p.points }} {% endif %}