diff --git a/anatomy/templates/anatomy/question_detail.html b/anatomy/templates/anatomy/question_detail.html index 1c9aa226..de98a73c 100644 --- a/anatomy/templates/anatomy/question_detail.html +++ b/anatomy/templates/anatomy/question_detail.html @@ -56,6 +56,9 @@ {{ author }}, {% endfor %} +
+ Open access: {{ question.open_access }} +
Annotation JSON (+/-):
{{ question.image_annotations }}
diff --git a/anatomy/views.py b/anatomy/views.py index 858d5124..a6d27ae7 100644 --- a/anatomy/views.py +++ b/anatomy/views.py @@ -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"}