.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user