This commit is contained in:
Ross
2021-01-03 16:56:32 +00:00
parent b7cf7e2a9a
commit b8023445fa
+2 -1
View File
@@ -317,6 +317,7 @@ def loadJsonAnswer(answer):
return True
def exam_json_edit(request, pk):
if request.is_ajax() and request.method == "POST":
@@ -326,7 +327,7 @@ def exam_json_edit(request, pk):
for q in exam.exam_questions.all():
q.open_acess = request.POST.get("set_open_access")
q.save()
questions_changed.append(q)
questions_changed.append(q.pk)
data = {"status": "success", "questions": json.dumps(questions_changed)}
return JsonResponse(data, status=200)