.
This commit is contained in:
+4
-3
@@ -197,9 +197,10 @@ class AddQuestionNote(CreateView):
|
|||||||
@csrf_exempt
|
@csrf_exempt
|
||||||
def answer_suggestion_submit(request):
|
def answer_suggestion_submit(request):
|
||||||
if request.is_ajax and request.method == "POST":
|
if request.is_ajax and request.method == "POST":
|
||||||
question_type, qid = request.POST.get("qid").split("/")
|
post_data = json.loads(request.body)
|
||||||
answer_string = request.POST.get("answer")
|
question_type, qid = post_data["qid"].split("/")
|
||||||
status = request.POST.get("status")
|
answer_string = post_data["answer"]
|
||||||
|
status = post_data["status"]
|
||||||
|
|
||||||
if str(status) not in " 012":
|
if str(status) not in " 012":
|
||||||
return JsonResponse({"success": False, "error": "Invalid status"})
|
return JsonResponse({"success": False, "error": "Invalid status"})
|
||||||
|
|||||||
@@ -419,6 +419,7 @@ class Exam(ExamBase):
|
|||||||
|
|
||||||
exam_questions[q.id] = {
|
exam_questions[q.id] = {
|
||||||
"images": images,
|
"images": images,
|
||||||
|
"normal": q.normal,
|
||||||
#"feedback_image": [],
|
#"feedback_image": [],
|
||||||
#"annotations": [str(q.image_annotations)],
|
#"annotations": [str(q.image_annotations)],
|
||||||
"type": "rapid",
|
"type": "rapid",
|
||||||
|
|||||||
Reference in New Issue
Block a user