This commit is contained in:
Ross
2021-12-12 23:04:11 +00:00
parent 81b29eca1d
commit 42e12896f9
2 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
<ol>
{% for cid in cid_users %}
<li>{{cid.cid}} [{{cid.passcode}}</li>
<li>{{cid.cid}} [{{cid.passcode}}]</li>
{% endfor %}
</ol>
+6 -5
View File
@@ -134,8 +134,8 @@ def answer_question(request, pk):
)
#@login_required
#def exam_take(request, pk, sk):
# @login_required
# def exam_take(request, pk, sk):
# """
# Allows taking of the exam on the django server (when logged in)
#
@@ -210,7 +210,7 @@ def answer_question(request, pk):
# )
#def flag_question(request):
# def flag_question(request):
# pk = request.GET.get("pk", None)
# ans = UserAnswer.objects.filter(user=request.user, question__pk=pk).first()
# ans.flagged = not ans.flagged
@@ -240,7 +240,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"})
return False, JsonResponse(
{"success": False, "error": "invalid cid / passcode"}
)
# if not exam.active:
# return False, JsonResponse(
@@ -535,7 +537,6 @@ def exam_scores_cid(request, pk):
"anatomy/exam_scores.html",
{
"cids": cids,
"passcode": passcode,
"exam": exam,
"unmarked": unmarked,
"questions": questions,