.
This commit is contained in:
@@ -645,6 +645,7 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
"json_creation_time": creation_time,
|
"json_creation_time": creation_time,
|
||||||
"exam_json_id": exam.exam_json_id,
|
"exam_json_id": exam.exam_json_id,
|
||||||
"exam_active": exam.active,
|
"exam_active": exam.active,
|
||||||
|
"exam_mode": exam.exam_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.question_type == "long":
|
if self.question_type == "long":
|
||||||
|
|||||||
@@ -634,6 +634,9 @@ def loadJsonAnswer(answer):
|
|||||||
|
|
||||||
exam = get_object_or_404(Exam, pk=eid)
|
exam = get_object_or_404(Exam, pk=eid)
|
||||||
|
|
||||||
|
if not exam.check_cid_user(answer["cid"], answer["passcode"]):
|
||||||
|
return False, JsonResponse({"success": False, "error": "invalid cid / passcode"})
|
||||||
|
|
||||||
# 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)}
|
||||||
|
|||||||
@@ -525,6 +525,9 @@ def loadJsonAnswer(answer):
|
|||||||
|
|
||||||
exam = get_object_or_404(Exam, pk=eid)
|
exam = get_object_or_404(Exam, pk=eid)
|
||||||
|
|
||||||
|
if not exam.check_cid_user(answer["cid"], answer["passcode"]):
|
||||||
|
return False, JsonResponse({"success": False, "error": "invalid cid / passcode"})
|
||||||
|
|
||||||
# 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)}
|
||||||
|
|||||||
Reference in New Issue
Block a user