This commit is contained in:
Ross
2021-05-14 22:08:42 +01:00
parent 77ddc7b4b1
commit 489958a9a7
2 changed files with 5 additions and 3 deletions
+4 -3
View File
@@ -197,9 +197,10 @@ class AddQuestionNote(CreateView):
@csrf_exempt
def answer_suggestion_submit(request):
if request.is_ajax and request.method == "POST":
question_type, qid = request.POST.get("qid").split("/")
answer_string = request.POST.get("answer")
status = request.POST.get("status")
post_data = json.loads(request.body)
question_type, qid = post_data["qid"].split("/")
answer_string = post_data["answer"]
status = post_data["status"]
if str(status) not in " 012":
return JsonResponse({"success": False, "error": "Invalid status"})
+1
View File
@@ -419,6 +419,7 @@ class Exam(ExamBase):
exam_questions[q.id] = {
"images": images,
"normal": q.normal,
#"feedback_image": [],
#"annotations": [str(q.image_annotations)],
"type": "rapid",