.
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"""
|
||||
|
||||
# Loop through rapidimage associations
|
||||
|
||||
@@ -575,6 +575,9 @@ class Series(models.Model):
|
||||
return size
|
||||
|
||||
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()
|
||||
|
||||
for series_image in self.images.all():
|
||||
|
||||
+1
-1
@@ -204,7 +204,7 @@ class Long(models.Model):
|
||||
return marker_unmarked
|
||||
|
||||
|
||||
def get_question_json(self, based=True):
|
||||
def get_question_json(self, based=True, feedback=False):
|
||||
# self == q?
|
||||
#q = get_object_or_404(Long, pk=question_id)
|
||||
question_id = self.pk
|
||||
|
||||
+5
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user