This commit is contained in:
Ross
2021-08-02 12:01:55 +01:00
parent 0b367312c5
commit cad0170167
3 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -582,10 +582,10 @@ def loadJsonAnswer(answer):
exam = get_object_or_404(Exam, pk=eid)
if not exam.active:
return False, JsonResponse(
{"success": False, "error": "No active exam: {}".format(eid)}
)
#if not exam.active:
# return False, JsonResponse(
# {"success": False, "error": "No active exam: {}".format(eid)}
# )
exiting_answers = CidUserAnswer.objects.filter(
question__id=answer["qid"], exam__id=eid, cid=answer["cid"]
+4 -4
View File
@@ -254,10 +254,10 @@ def loadJsonAnswer(answer):
exam = get_object_or_404(Exam, pk=answer["eid"])
if not exam.active:
return False, JsonResponse(
{"success": False, "error": "No active exam: {}".format(answer["eid"])}
)
#if not exam.active:
# return False, JsonResponse(
# {"success": False, "error": "No active exam: {}".format(answer["eid"])}
# )
questions = defaultdict(dict)
+4 -4
View File
@@ -591,10 +591,10 @@ def loadJsonAnswer(answer):
exam = get_object_or_404(Exam, pk=eid)
if not exam.active:
return False, JsonResponse(
{"success": False, "error": "No active exam: {}".format(eid)}
)
#if not exam.active:
# return False, JsonResponse(
# {"success": False, "error": "No active exam: {}".format(eid)}
# )
exiting_answers = CidUserAnswer.objects.filter(
question__id=answer["qid"], exam__id=eid, cid=answer["cid"]