.
This commit is contained in:
@@ -827,6 +827,9 @@ class ExamBase(ExamOrCollectionGenericBase):
|
||||
self.recreate_json = recreate_json
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
def get_questions(self):
|
||||
return self.exam_questions.all().order_by("examquestiondetail__sort_order")
|
||||
|
||||
def get_exam_stats(self, name=True):
|
||||
if self.stats_candidates < int(4):
|
||||
return f"- Candidates: {int(self.stats_candidates)} (too few to generate stats)"
|
||||
|
||||
+1
-1
@@ -505,7 +505,7 @@ class Exam(ExamBase):
|
||||
return exam_question
|
||||
|
||||
def get_exam_json(self, based=True):
|
||||
questions = self.exam_questions.all()
|
||||
questions = self.get_questions()
|
||||
|
||||
exam_questions = defaultdict(dict)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user