From 3dec07eb2c9e3b1f9aa11bc1820d7d2d566628a5 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 10 Dec 2021 23:43:49 +0000 Subject: [PATCH] . --- physics/models.py | 2 +- physics/templates/physics/exam_take.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 %}