.
This commit is contained in:
+4
-4
@@ -582,10 +582,10 @@ def loadJsonAnswer(answer):
|
|||||||
|
|
||||||
exam = get_object_or_404(Exam, pk=eid)
|
exam = get_object_or_404(Exam, pk=eid)
|
||||||
|
|
||||||
if not exam.active:
|
#if not exam.active:
|
||||||
return False, JsonResponse(
|
# return False, JsonResponse(
|
||||||
{"success": False, "error": "No active exam: {}".format(eid)}
|
# {"success": False, "error": "No active exam: {}".format(eid)}
|
||||||
)
|
# )
|
||||||
|
|
||||||
exiting_answers = CidUserAnswer.objects.filter(
|
exiting_answers = CidUserAnswer.objects.filter(
|
||||||
question__id=answer["qid"], exam__id=eid, cid=answer["cid"]
|
question__id=answer["qid"], exam__id=eid, cid=answer["cid"]
|
||||||
|
|||||||
+4
-4
@@ -254,10 +254,10 @@ def loadJsonAnswer(answer):
|
|||||||
|
|
||||||
exam = get_object_or_404(Exam, pk=answer["eid"])
|
exam = get_object_or_404(Exam, pk=answer["eid"])
|
||||||
|
|
||||||
if not exam.active:
|
#if not exam.active:
|
||||||
return False, JsonResponse(
|
# return False, JsonResponse(
|
||||||
{"success": False, "error": "No active exam: {}".format(answer["eid"])}
|
# {"success": False, "error": "No active exam: {}".format(answer["eid"])}
|
||||||
)
|
# )
|
||||||
|
|
||||||
questions = defaultdict(dict)
|
questions = defaultdict(dict)
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -591,10 +591,10 @@ def loadJsonAnswer(answer):
|
|||||||
|
|
||||||
exam = get_object_or_404(Exam, pk=eid)
|
exam = get_object_or_404(Exam, pk=eid)
|
||||||
|
|
||||||
if not exam.active:
|
#if not exam.active:
|
||||||
return False, JsonResponse(
|
# return False, JsonResponse(
|
||||||
{"success": False, "error": "No active exam: {}".format(eid)}
|
# {"success": False, "error": "No active exam: {}".format(eid)}
|
||||||
)
|
# )
|
||||||
|
|
||||||
exiting_answers = CidUserAnswer.objects.filter(
|
exiting_answers = CidUserAnswer.objects.filter(
|
||||||
question__id=answer["qid"], exam__id=eid, cid=answer["cid"]
|
question__id=answer["qid"], exam__id=eid, cid=answer["cid"]
|
||||||
|
|||||||
Reference in New Issue
Block a user