This commit is contained in:
Ross
2021-07-29 19:33:01 +01:00
parent d096d7c146
commit 64110684d8
+2 -1
View File
@@ -253,7 +253,7 @@ def exam_take(request, pk, sk, cid):
pos = exam.get_question_index(question) + 1
answer = question.cid_user_answers.filter(
cid=cid).first()
cid=cid, exam=exam).first()
if request.method == "POST":
if answer:
@@ -264,6 +264,7 @@ def exam_take(request, pk, sk, cid):
answer = form.save(commit=False)
answer.cid = cid
answer.question = question
answer.exam = exam
# answer.published_date = timezone.now()
answer.save()
if "next" in request.POST: