.
This commit is contained in:
+4
-3
@@ -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"})
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user