.
This commit is contained in:
+3
-1
@@ -322,11 +322,13 @@ def exam_json_edit(request, pk):
|
||||
|
||||
exam = get_object_or_404(Exam, pk=pk)
|
||||
|
||||
questions_changed = []
|
||||
for q in exam.exam_questions.all():
|
||||
q.open_acess = request.POST.get("set_open_access")
|
||||
q.save()
|
||||
questions_changed.append(q)
|
||||
|
||||
data = {"status": "success"}
|
||||
data = {"status": "success", "questions": json.dumps(questions_changed)}
|
||||
return JsonResponse(data, status=200)
|
||||
else:
|
||||
data = {"status": "error"}
|
||||
|
||||
Reference in New Issue
Block a user