diff --git a/anatomy/models.py b/anatomy/models.py index 4f75f5ac..b035aff3 100644 --- a/anatomy/models.py +++ b/anatomy/models.py @@ -181,12 +181,12 @@ class AnatomyQuestion(models.Model): if i.status != i.MarkOptions.UNMARKED ] ) - correct_answers = set([i.answer.lower() for i in self.answers.all()]) + correct_answers = set([i.answer.get_compare_string() for i in self.answers.all()]) half_mark_answers = set( - [i.answer.lower() for i in self.half_mark_answers.all()] + [i.answer.get_compare_string() for i in self.half_mark_answers.all()] ) incorrect_answers = set( - [i.answer.lower() for i in self.incorrect_answers.all()] + [i.answer.get_compare_string() for i in self.incorrect_answers.all()] ) marked_answers = correct_answers | half_mark_answers | incorrect_answers diff --git a/anatomy/static/css/anatomy.css b/anatomy/static/css/anatomy.css index 747ef2c4..98890134 100644 --- a/anatomy/static/css/anatomy.css +++ b/anatomy/static/css/anatomy.css @@ -13,6 +13,10 @@ a, a:link { .answer-list { font-size: 30px; + user-select: none; + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ } .answer-list .correct { @@ -313,4 +317,4 @@ img.uploading:hover { .parent-help .help-text { opacity: 0%; -} \ No newline at end of file +} diff --git a/anatomy/tables.py b/anatomy/tables.py index c15d64f6..7f1c9808 100644 --- a/anatomy/tables.py +++ b/anatomy/tables.py @@ -28,10 +28,11 @@ class AnatomyQuestionTable(tables.Table): # text='Clone', # args=[A('pk')], # orderable=False) + exams = tables.ManyToManyColumn(verbose_name="Exams") class Meta: model = AnatomyQuestion template_name = "django_tables2/bootstrap4.html" - fields = ("question_type", "exams", "description", "examination", "modality", "region", + fields = ("question_type", "description", "examination", "modality", "region", "body_part", "created_date", "open_access", "author") - sequence = ("view", "image") \ No newline at end of file + sequence = ("view", "image", "exams") \ No newline at end of file diff --git a/anatomy/views.py b/anatomy/views.py index 7f4dfd77..331201f4 100644 --- a/anatomy/views.py +++ b/anatomy/views.py @@ -273,6 +273,7 @@ def loadJsonAnswer(answer): # should never be more than one (famous last words) ans = exiting_answers[0] ans.answer = answer["ans"] + ans.full_clean() ans.save() return True