This commit is contained in:
Ross
2021-03-02 20:49:08 +00:00
parent c0eeb17482
commit c661a5c9c5
2 changed files with 17 additions and 1 deletions
+15
View File
@@ -352,6 +352,21 @@ class Exam(ExamBase):
help_text="Exam time limit (in seconds). Default is 2100 secondse (35 minutes)", default=2100
)
def get_normal_abnormal_breakdown(self):
# Inefficient but more extendible
questions = self.exam_questions.all()
normal = []
abnormal = []
for q in question:
if q.normal:
normal.append(q)
else:
abnormal.append(q)
return len(normal)
def get_exam_json(self):
questions = self.exam_questions.all()