.
This commit is contained in:
@@ -171,6 +171,9 @@ class Long(models.Model):
|
||||
["https://www.penracourses.org.uk{}".format(i.url) for i in self.get_images()]
|
||||
)
|
||||
|
||||
def get_image_url_array(self):
|
||||
return ["https://www.penracourses.org.uk{}".format(i.url) for i in self.get_images()]
|
||||
|
||||
def get_unmarked_answer_count(self):
|
||||
answers = self.cid_user_answers.all()
|
||||
return len([ans for ans in answers if not ans.is_marked()])
|
||||
@@ -416,6 +419,14 @@ class LongSeries(models.Model):
|
||||
|
||||
return ",".join(images)
|
||||
|
||||
def get_image_url_array(self, feedback=False):
|
||||
images = [
|
||||
"https://www.penracourses.org.uk{}".format(i.image.url)
|
||||
for i in self.images.all()
|
||||
]
|
||||
|
||||
return images
|
||||
|
||||
def get_thumbnail(self):
|
||||
images = self.images.all()
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Associated case:
|
||||
This series is not associated with any cases.
|
||||
{% endif %}
|
||||
|
||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ series.get_image_urls }}" data-annotations=''></div>
|
||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ series.get_image_url_array }}" data-annotations=''></div>
|
||||
|
||||
<div>Author: {{ series.get_author_display }}</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user