.
This commit is contained in:
@@ -56,6 +56,9 @@
|
|||||||
{{ author }},
|
{{ author }},
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
Open access: {{ question.open_access }}
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span id="annotation-json-toggle">Annotation JSON (+/-):</span> <span id="annotation-json-content"><pre>{{ question.image_annotations }}</pre></span>
|
<span id="annotation-json-toggle">Annotation JSON (+/-):</span> <span id="annotation-json-content"><pre>{{ question.image_annotations }}</pre></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+3
-1
@@ -322,11 +322,13 @@ def exam_json_edit(request, pk):
|
|||||||
|
|
||||||
exam = get_object_or_404(Exam, pk=pk)
|
exam = get_object_or_404(Exam, pk=pk)
|
||||||
|
|
||||||
|
questions_changed = []
|
||||||
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)
|
||||||
|
|
||||||
data = {"status": "success"}
|
data = {"status": "success", "questions": json.dumps(questions_changed)}
|
||||||
return JsonResponse(data, status=200)
|
return JsonResponse(data, status=200)
|
||||||
else:
|
else:
|
||||||
data = {"status": "error"}
|
data = {"status": "error"}
|
||||||
|
|||||||
Reference in New Issue
Block a user