This commit is contained in:
Ross
2021-12-12 17:02:27 +00:00
parent da7ac995c6
commit eb6208c5dc
3 changed files with 7 additions and 0 deletions
+1
View File
@@ -645,6 +645,7 @@ class ExamViews(View, LoginRequiredMixin):
"json_creation_time": creation_time,
"exam_json_id": exam.exam_json_id,
"exam_active": exam.active,
"exam_mode": exam.exam_mode,
}
if self.question_type == "long":
+3
View File
@@ -634,6 +634,9 @@ def loadJsonAnswer(answer):
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:
# return False, JsonResponse(
# {"success": False, "error": "No active exam: {}".format(eid)}
+3
View File
@@ -525,6 +525,9 @@ def loadJsonAnswer(answer):
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:
# return False, JsonResponse(
# {"success": False, "error": "No active exam: {}".format(eid)}