Skip to content

Commit

Permalink
not showing 0 points (closes #44)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeygrigorev committed Jun 19, 2024
1 parent f4aedde commit 37ce0cf
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions courses/templates/homework/homework.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

{% block content %}

<h2 class="mb-3 text-center">{{ homework.title }} for <a href="{% url 'course' course.slug %}">{{ course.title }}</a></h2>
<h2 class="mb-3 text-center">
{{ homework.title }} for
<a href="{% url 'course' course.slug %}">{{ course.title }}</a>
</h2>

{% if messages %}
{% for message in messages %}
Expand Down Expand Up @@ -45,7 +48,7 @@ <h2 class="mb-3 text-center">{{ homework.title }} for <a href="{% url 'course' c
</div>

<div>
<p>Due date: <span class="local-date">{{ homework.due_date |date:"c"}}</span> (local time)</p>
<p>Due date: <span class="local-date">{{ homework.due_date |date:"c" }}</span> (local time)</p>
</div>

{% if not is_authenticated %}
Expand All @@ -65,10 +68,14 @@ <h3 class="mb-3">Questions</h3>
<div class="mb-3 question">
<p class="question-text">
Question {{ forloop.counter }}. {{ question.text }}
<span class="text-muted">
({{ question.scores_for_correct_answer }}
{{ question.scores_for_correct_answer|pluralize:"point,points" }})
</span>
{% if question.scores_for_correct_answer != 0 %}
<span class="text-muted">
({{ question.scores_for_correct_answer }}
{{ question.scores_for_correct_answer|pluralize:"point,points" }})
</span>
{% else %}
<span class="text-muted">(not graded)</span>
{% endif %}
</p>

{% if question.question_type == 'MC' %}
Expand Down

0 comments on commit 37ce0cf

Please sign in to comment.