This commit is contained in:
Ross
2021-12-20 19:16:17 +00:00
parent 9e9a059e62
commit 6214be9939
11 changed files with 219 additions and 25 deletions
+2 -1
View File
@@ -48,7 +48,7 @@ from .models import (
# HalfMarkAnswers,
# IncorrectAnswers,
)
from generic.models import Examination
from generic.models import CidUser, Examination
from generic.views import ExamCloneMixin, ExamViews, GenericViewBase
from reversion.views import RevisionMixin
@@ -243,6 +243,7 @@ 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"}