From 04aa5689aa047826bf0553feaf3053b1091b91bd Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 11 Sep 2021 14:22:21 +0100 Subject: [PATCH] . --- generic/models.py | 5 ++++- rapids/templates/rapids/exam_overview.html | 9 --------- templates/exam_notes.html | 10 ++++++++++ 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 templates/exam_notes.html diff --git a/generic/models.py b/generic/models.py index bd4f5d25..21ebc3b5 100644 --- a/generic/models.py +++ b/generic/models.py @@ -153,4 +153,7 @@ class QuestionNote(models.Model): if self.user_author is not None: return self.user_author.username else: - return self.author \ No newline at end of file + return self.author + + def get_short_str(self): + return f"{self.note_type} - {self.note}" \ No newline at end of file diff --git a/rapids/templates/rapids/exam_overview.html b/rapids/templates/rapids/exam_overview.html index 47fae5ce..a005c96b 100644 --- a/rapids/templates/rapids/exam_overview.html +++ b/rapids/templates/rapids/exam_overview.html @@ -10,15 +10,6 @@ Edit

Exam: {{ exam.name }}

- {% if notes %} - - - {% endif %} This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds.
diff --git a/templates/exam_notes.html b/templates/exam_notes.html new file mode 100644 index 00000000..2263892b --- /dev/null +++ b/templates/exam_notes.html @@ -0,0 +1,10 @@ +{% if notes %} + +{% endif %} \ No newline at end of file