This commit is contained in:
Ross
2022-04-06 16:50:54 +01:00
parent 640fff2549
commit c1dd40031d
5 changed files with 17 additions and 4 deletions
+5 -1
View File
@@ -433,7 +433,7 @@ class Rapid(models.Model):
return new_answers
def get_question_json(self, based=True):
def get_question_json(self, based=True, feedback=False):
"""Returns json"""
# Loop through rapidimage associations
@@ -468,6 +468,10 @@ class Rapid(models.Model):
json["feedback_images"] = feedback_images
json["answers"] = list(self.get_correct_unstripped_answers())
if feedback:
json["feedback"] = self.feedback
return json
@@ -7,7 +7,12 @@
Question <span class="question-number">1</span>
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
</div>
<div class="answers">Answers: </div>
<div class="feedback"></div>
<div>
<details>
<summary>Answers: <span class="answers"></span></summary>
</details>
</div>
</div>
</div>
<div class="rapids">
@@ -62,6 +67,7 @@
$(".question-display-block .answers").empty().append(data.answers.toString());
n = parseInt(question_number) + 1
$(".question-display-block .question-number").empty().append(n);
$(".question-display-block .feedback").empty().append(data.feedback);
// show some message according to the response.
// For eg. A message box showing that the status has been changed
$(".inner-display-block").show();