.
This commit is contained in:
@@ -56,6 +56,9 @@
|
||||
{{ author }},
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div>
|
||||
Open access: {{ question.open_access }}
|
||||
</div>
|
||||
<div>
|
||||
<span id="annotation-json-toggle">Annotation JSON (+/-):</span> <span id="annotation-json-content"><pre>{{ question.image_annotations }}</pre></span>
|
||||
</div>
|
||||
|
||||
+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