- Question order may be different on the test system (as json order is not guaranteed to be maintained)
+ You can start marking from a particular question by clicking on it below.
diff --git a/anatomy/views.py b/anatomy/views.py
index 7bc47e1a..6e23bcf6 100644
--- a/anatomy/views.py
+++ b/anatomy/views.py
@@ -281,12 +281,12 @@ def loadJsonAnswer(answer):
if (not isinstance(answer["cid"], int)) or (
not isinstance(answer["eid"], int) or (not isinstance(answer["ans"], str))
):
- return JsonResponse({"success": False})
+ return JsonResponse({"success": False, "error": "cid or eid or answers not defined"})
# The model should catch invalid data but this should be less intensive
- max_int = 10000000
+ max_int = 999999999999999999999
if answer["cid"] > max_int or answer["eid"] > max_int:
- return JsonResponse({"success": False})
+ return JsonResponse({"success": False, "error": "invalid cid"})
exam = get_object_or_404(Exam, pk=answer["eid"])
@@ -420,6 +420,10 @@ def mark(request, pk, sk):
# TODO: convert to JSON request
# *******************************
if form.is_valid():
+ # If skip button is pressed skip the question without marking
+ if "skip" in request.POST:
+ return redirect("anatomy:mark", pk=pk, sk=n + 1)
+
cd = form.cleaned_data
# correct = cd.get("correct")
# half_correct = cd.get("half_correct")