Enhance image display in mark_answer.html and add remote URL to context in mark_answer view for improved layout and functionality
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -285,6 +285,8 @@ class Question(QuestionBase):
|
||||
json["feedback"] = self.feedback
|
||||
|
||||
return json
|
||||
|
||||
|
||||
|
||||
|
||||
class QuestionImage(models.Model):
|
||||
|
||||
@@ -187,11 +187,11 @@
|
||||
<p class="pre-whitespace mb-2"><b>Abnormality:</b> {{ question.get_abnormalities }}</p>
|
||||
<div class="pre-whitespace multi-image-block mb-2"><b>Images:</b>
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-2 w-auto">
|
||||
{% for image in question.images.all %}
|
||||
<div class="col-md-4 mb-2">
|
||||
<div class="card h-100 bg-dark text-light border-secondary">
|
||||
<div class="card h-100 w-auto bg-dark text-light border-secondary">
|
||||
<div class="card-body p-2">
|
||||
<span class="image-block">
|
||||
<span class="image-block" style="">
|
||||
<strong>Image {{ forloop.counter }}</strong>
|
||||
{% if image.description %} ({{image.description}}){% endif %}
|
||||
{% if image.feedback_image %}
|
||||
@@ -202,8 +202,8 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="pre-whitespace mb-0"><b>Feedback:</b> {{ question.feedback }}</p>
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user