.
This commit is contained in:
+2
-1
@@ -317,6 +317,7 @@ def loadJsonAnswer(answer):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def exam_json_edit(request, pk):
|
def exam_json_edit(request, pk):
|
||||||
if request.is_ajax() and request.method == "POST":
|
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():
|
for q in exam.exam_questions.all():
|
||||||
q.open_acess = request.POST.get("set_open_access")
|
q.open_acess = request.POST.get("set_open_access")
|
||||||
q.save()
|
q.save()
|
||||||
questions_changed.append(q)
|
questions_changed.append(q.pk)
|
||||||
|
|
||||||
data = {"status": "success", "questions": json.dumps(questions_changed)}
|
data = {"status": "success", "questions": json.dumps(questions_changed)}
|
||||||
return JsonResponse(data, status=200)
|
return JsonResponse(data, status=200)
|
||||||
|
|||||||
Reference in New Issue
Block a user