.
This commit is contained in:
+7
-8
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user