From 50aff5108d1e38b811fbaf150d3aeef802e58bb3 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 25 Jan 2021 16:01:53 +0000 Subject: [PATCH] . --- anatomy/templates/anatomy/exam_overview.html | 4 +++- rapids/models.py | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/anatomy/templates/anatomy/exam_overview.html b/anatomy/templates/anatomy/exam_overview.html index e03b8aa4..92e834c9 100644 --- a/anatomy/templates/anatomy/exam_overview.html +++ b/anatomy/templates/anatomy/exam_overview.html @@ -20,7 +20,9 @@ {% for question in questions.all %}
  • - thumbail + {% for image in questions.GetImages %} + thumbail + {% endfor %} {{ question.description }}
    {{ question.question_type }}: {{ question.GetPrimaryAnswer }} diff --git a/rapids/models.py b/rapids/models.py index 3f961b61..3ba55ab7 100644 --- a/rapids/models.py +++ b/rapids/models.py @@ -273,6 +273,17 @@ class Rapid(models.Model): marked_answers = correct_answers | half_mark_answers | incorrect_answers return marked_answers + def GetImages(self, feedback=False): + images = self.images.all() + + if not feedback: + images = [i for i in images if not images.feedback_image] + + return [images] + + #def GetNonFeedbackQuestionImages(self): + #return self.GetImages() + class RapidImage(models.Model): rapid = models.ForeignKey(Rapid,