This commit is contained in:
Ross
2021-01-28 10:58:10 +00:00
parent 5e77160bbf
commit a2864d0755
3 changed files with 36 additions and 24 deletions
+7 -8
View File
@@ -1,3 +1,4 @@
import json
from django.shortcuts import render, get_object_or_404, redirect
from django import forms
@@ -572,15 +573,13 @@ def postExamAnswers(request):
if request.is_ajax and request.method == "POST":
n = 0
# horrible but it works
for k in request.POST.dict():
print(k)
for answer in json.loads(k):
ret = loadJsonAnswer(answer)
for answer in json.loads(request.POST.get("answers")):
ret = loadJsonAnswer(answer)
if ret is not True:
return ret
n = n + 1
if ret is not True:
return ret
n = n + 1
# print(UserAnswer.objects.filter(exam__id=q["eid"]))
# print(request.urlencode())