fix question ordering through mark systems

This commit is contained in:
Ross
2024-08-05 10:00:59 +01:00
parent a304c0b4dc
commit cff5a46e4c
14 changed files with 71 additions and 288 deletions
+4 -1
View File
@@ -886,7 +886,10 @@ class ExamBase(ExamOrCollectionGenericBase):
# return super().clean(*args, **kwargs)
def get_questions(self):
"""Returns a list of questions in the exam in the correct order"""
"""Returns a list of questions in the exam in the correct order
This should be used in preference to exam_questions.all() as it
will order the questions correctly"""
return self.exam_questions.all().order_by("examquestiondetail__sort_order")
def order_questions(self):