From 6b1db6b3c5d94d4f7760284b2858c436448321ed Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 8 Sep 2025 11:25:28 +0100 Subject: [PATCH] Enhance image display in mark_answer.html and add remote URL to context in mark_answer view for improved layout and functionality --- rad/static/css/anatomy.css | 5 +++++ shorts/models.py | 2 ++ shorts/templates/shorts/mark_answer.html | 8 ++++---- shorts/views.py | 1 + 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/rad/static/css/anatomy.css b/rad/static/css/anatomy.css index ace6bc26..b3026a1e 100644 --- a/rad/static/css/anatomy.css +++ b/rad/static/css/anatomy.css @@ -1408,4 +1408,9 @@ span#user-id { .row-selector tbody tr.selected td { background-color: #b3d7ff !important; color: #333; +} + +.image-block { + min-width: 100px; +display: inline-block; } \ No newline at end of file diff --git a/shorts/models.py b/shorts/models.py index 4153ffb9..bf1a7e7c 100644 --- a/shorts/models.py +++ b/shorts/models.py @@ -285,6 +285,8 @@ class Question(QuestionBase): json["feedback"] = self.feedback return json + + class QuestionImage(models.Model): diff --git a/shorts/templates/shorts/mark_answer.html b/shorts/templates/shorts/mark_answer.html index 5c14cced..a938ca80 100644 --- a/shorts/templates/shorts/mark_answer.html +++ b/shorts/templates/shorts/mark_answer.html @@ -187,11 +187,11 @@

Abnormality: {{ question.get_abnormalities }}

Images:
+
{% for image in question.images.all %} -
-
+
- + Image {{ forloop.counter }} {% if image.description %} ({{image.description}}){% endif %} {% if image.feedback_image %} @@ -202,8 +202,8 @@
-
{% endfor %} +

Feedback: {{ question.feedback }}

diff --git a/shorts/views.py b/shorts/views.py index 5034adef..8be10296 100644 --- a/shorts/views.py +++ b/shorts/views.py @@ -545,6 +545,7 @@ def mark_answer(request, exam_id, question_number, answer_id, override=False): "previous_answer_id": previous_answer_id, "next_answer_id": next_answer_id, "answer_id": answer_id, + "remote_url": settings.REMOTE_URL, }, )