diff --git a/physics/models.py b/physics/models.py index 02c03dd2..642449a2 100644 --- a/physics/models.py +++ b/physics/models.py @@ -124,7 +124,7 @@ class Question(models.Model): return reverse("physics:question_detail", kwargs={"pk": self.pk}) def get_answers(self): - return (self.a_answer, self.b_answer, self.c_answer, self.d_answer, self.e_answer) + return [self.a_answer, self.b_answer, self.c_answer, self.d_answer, self.e_answer] def get_questions(self): return [self.a, self.b, self.c, self.d, self.e] diff --git a/physics/templates/physics/exam_take.html b/physics/templates/physics/exam_take.html index 609f4ab5..bad4a886 100755 --- a/physics/templates/physics/exam_take.html +++ b/physics/templates/physics/exam_take.html @@ -104,7 +104,7 @@ {{question.get_answers}}.forEach(el, n) { console.log(el;) - } + }; //$("ul.physics-answer-list li[data-ans='{{question.best_answer}}']").addClass("correct"); {% endif %}