.
This commit is contained in:
+1
-1
@@ -259,7 +259,7 @@ class AnatomyQuestion(models.Model):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_question_json(self, based=True):
|
def get_question_json(self, based=True, feedback=False):
|
||||||
"""Returns a json representation of the question"""
|
"""Returns a json representation of the question"""
|
||||||
|
|
||||||
# Loop through rapidimage associations
|
# Loop through rapidimage associations
|
||||||
|
|||||||
@@ -575,6 +575,9 @@ class Series(models.Model):
|
|||||||
return size
|
return size
|
||||||
|
|
||||||
def anonymise_images(self):
|
def anonymise_images(self):
|
||||||
|
# NOTE: this will not maintain the correct hashed filename
|
||||||
|
# but that doesn't matter as we will never get the same anonymisation
|
||||||
|
# even with the same dicom...
|
||||||
anonymizer = dicognito.anonymizer.Anonymizer()
|
anonymizer = dicognito.anonymizer.Anonymizer()
|
||||||
|
|
||||||
for series_image in self.images.all():
|
for series_image in self.images.all():
|
||||||
|
|||||||
+1
-1
@@ -204,7 +204,7 @@ class Long(models.Model):
|
|||||||
return marker_unmarked
|
return marker_unmarked
|
||||||
|
|
||||||
|
|
||||||
def get_question_json(self, based=True):
|
def get_question_json(self, based=True, feedback=False):
|
||||||
# self == q?
|
# self == q?
|
||||||
#q = get_object_or_404(Long, pk=question_id)
|
#q = get_object_or_404(Long, pk=question_id)
|
||||||
question_id = self.pk
|
question_id = self.pk
|
||||||
|
|||||||
+5
-1
@@ -433,7 +433,7 @@ class Rapid(models.Model):
|
|||||||
|
|
||||||
return new_answers
|
return new_answers
|
||||||
|
|
||||||
def get_question_json(self, based=True):
|
def get_question_json(self, based=True, feedback=False):
|
||||||
"""Returns json"""
|
"""Returns json"""
|
||||||
|
|
||||||
# Loop through rapidimage associations
|
# Loop through rapidimage associations
|
||||||
@@ -468,6 +468,10 @@ class Rapid(models.Model):
|
|||||||
json["feedback_images"] = feedback_images
|
json["feedback_images"] = feedback_images
|
||||||
json["answers"] = list(self.get_correct_unstripped_answers())
|
json["answers"] = list(self.get_correct_unstripped_answers())
|
||||||
|
|
||||||
|
if feedback:
|
||||||
|
json["feedback"] = self.feedback
|
||||||
|
|
||||||
|
|
||||||
return json
|
return json
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,12 @@
|
|||||||
Question <span class="question-number">1</span>
|
Question <span class="question-number">1</span>
|
||||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
|
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
|
||||||
</div>
|
</div>
|
||||||
<div class="answers">Answers: </div>
|
<div class="feedback"></div>
|
||||||
|
<div>
|
||||||
|
<details>
|
||||||
|
<summary>Answers: <span class="answers"></span></summary>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rapids">
|
<div class="rapids">
|
||||||
@@ -62,6 +67,7 @@
|
|||||||
$(".question-display-block .answers").empty().append(data.answers.toString());
|
$(".question-display-block .answers").empty().append(data.answers.toString());
|
||||||
n = parseInt(question_number) + 1
|
n = parseInt(question_number) + 1
|
||||||
$(".question-display-block .question-number").empty().append(n);
|
$(".question-display-block .question-number").empty().append(n);
|
||||||
|
$(".question-display-block .feedback").empty().append(data.feedback);
|
||||||
// show some message according to the response.
|
// show some message according to the response.
|
||||||
// For eg. A message box showing that the status has been changed
|
// For eg. A message box showing that the status has been changed
|
||||||
$(".inner-display-block").show();
|
$(".inner-display-block").show();
|
||||||
|
|||||||
Reference in New Issue
Block a user