Merge branch 'master' of ssh://161.35.163.87:/home/django/rad

This commit is contained in:
Ross
2021-03-08 11:43:38 +00:00
11 changed files with 104 additions and 33 deletions
+4 -11
View File
@@ -205,6 +205,7 @@ class Long(models.Model):
#"feedback_image": [],
#"annotations": [str(q.image_annotations)],
"type": "long",
"cached": False,
}
return exam_question
@@ -393,14 +394,10 @@ class LongSeries(models.Model):
else:
skipcount = skipcount + 1
print("skipped, no SliceLocation: {}".format(skipcount))
print("skipped, no {}: {}".format(field, skipcount))
# ensure they are in the correct order
slices = sorted(slices, key=lambda s: s[field].value)
#if field == "SliceLocation":
# slices = sorted(slices, key=lambda s: s.SliceLocation)
#elif field == "InstanceNumber":
# slices = sorted(slices, key=lambda s: s.InstanceNumber)
#print(slices)
@@ -632,12 +629,6 @@ class CidUserAnswer(models.Model):
ans = ans.strip()
# def get_compare_string(self):
# # strip here should be unneccasry (providing clean is now working)
# s = self.answer.lower().strip()
# s = s.translate(str.maketrans('', '', string.punctuation))
# return s
def is_marked(self):
if self.score == "":
return False
@@ -645,4 +636,6 @@ class CidUserAnswer(models.Model):
return True
def get_answer_score(self):
if self.score == "":
return ""
return float(self.score)