diff --git a/anatomy/filters.py b/anatomy/filters.py index f4ab4416..a4748a71 100644 --- a/anatomy/filters.py +++ b/anatomy/filters.py @@ -52,7 +52,7 @@ class AnatomyUserAnswerFilter(django_filters.FilterSet): fields = ( "cid", "user", - "question", + #"question", "answer", #"answer_compare", "exam", @@ -63,5 +63,6 @@ class AnatomyUserAnswerFilter(django_filters.FilterSet): def __init__(self, data=None, queryset=None, prefix=None, strict=None, user=None, request=None): if not request.user.groups.filter(name="anatomy_checker").exists(): queryset = queryset.filter(open_access=True) | queryset.filter(author__id=request.user.id) + #queryset = queryset.prefetch_related("question", "question__question_type", "exam") super(AnatomyUserAnswerFilter, self).__init__(data=data, queryset=queryset, prefix=prefix, request=request) pass \ No newline at end of file diff --git a/anatomy/tables.py b/anatomy/tables.py index 7192bd5b..6d00185f 100644 --- a/anatomy/tables.py +++ b/anatomy/tables.py @@ -79,3 +79,11 @@ class AnatomyUserAnswerTable(tables.Table): "updated", ) + def __init__(self, data=None, *args, **kwargs): + super().__init__( + data.prefetch_related( + "exam", "question", "question__question_type", "question__modality", "question__examination", "question__region", "user" + ), + *args, + **kwargs, + ) diff --git a/generic/templates/generic/exam_cids_edit.html b/generic/templates/generic/exam_cids_edit.html index d2ad6de4..2606d148 100644 --- a/generic/templates/generic/exam_cids_edit.html +++ b/generic/templates/generic/exam_cids_edit.html @@ -2,7 +2,7 @@
This page shows the exam(s) to which you have access.
-When an exam is available to take it will be highlighted with the text [Active].
-Once you have submitted answers you will be able to view them from the Exam results section. (Please note: although your answers will be visible as soon as they are submitted correct answers will only be available when the exam results have been published.)
+When an exam is available to take it will have a "Start" button next to it.
+Once you have submitted answers you will be able to view them from the Exam results section. (Please note: although your answers will be visible as soon as they are submitted, correct answers will only be available when the exam results have been published.)
+If you have not submitted any answer for an exam it will not appear in the Exam Results section below. In this case you can still review the pubilshed results by following the "Results Published" link in the assigend exams section.