This commit is contained in:
Ross
2021-09-11 14:22:21 +01:00
parent e3fbde8e39
commit 04aa5689aa
3 changed files with 14 additions and 10 deletions
+4 -1
View File
@@ -153,4 +153,7 @@ class QuestionNote(models.Model):
if self.user_author is not None:
return self.user_author.username
else:
return self.author
return self.author
def get_short_str(self):
return f"{self.note_type} - {self.note}"
@@ -10,15 +10,6 @@
Edit</a>
<h1>Exam: {{ exam.name }}</h1>
{% if notes %}
<div class="alert alert-warning" role="alert">
The following questions have active notes
{% for note in notes %}
{{note}}
{% endfor %}
</div>
{% endif %}
This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds.<br />
<div class="parent-help" title="">
+10
View File
@@ -0,0 +1,10 @@
{% if notes %}
<div class="alert alert-warning" role="alert">
The following questions have active notes
<ul>
{% for note in notes %}
<li>{{note.get_author_str}}: <a href="{{note.get_absolute_url}}">{{note.get_short_str}}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}