let (non admin) users mark
This commit is contained in:
@@ -275,4 +275,8 @@ img.uploading:hover {
|
||||
transform: scale(0.95);
|
||||
box-shadow: 0 0 0 0 rgba(142, 68, 173, 0);
|
||||
}
|
||||
}
|
||||
|
||||
#annotation-json-content {
|
||||
display: none;
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
{% block content %}
|
||||
<h2>Marking question {{question_details.current}} of {{question_details.total}}</h2>
|
||||
<a href="{% url 'anatomy:anatomy_question_update' question.id %}" title="Edit the Question">Edit</a> <a href="{% url 'admin:anatomy_anatomyquestion_change' question.id %}" title="Edit the Question using the admin interface">Admin Edit</a>
|
||||
<p>{{ question.question_type }}</p>
|
||||
|
||||
<div id="dicom-image" data-url="{{ question.image.url}}" data-annotations='{{question.image_annotations}}'>
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
Answers (score): {% for answer in question.answers.all %}
|
||||
{{ answer }} ({{answer.status}}),
|
||||
{% endfor %}
|
||||
<div>
|
||||
Description: {{ question.description }}
|
||||
</div>
|
||||
<div>
|
||||
Examinations: {% for exam in question.exams.all %}
|
||||
{{ exam.name }}
|
||||
@@ -30,11 +33,25 @@
|
||||
Region: {{ question.region }}
|
||||
</div>
|
||||
<div>
|
||||
Annotation JSON: {{ question.image_annotations }}
|
||||
Structure: {{ question.structure }}
|
||||
</div>
|
||||
<div>
|
||||
Body Part: {{ question.body_part }}
|
||||
</div>
|
||||
<div>
|
||||
Author: {% for user in question.author.all %}
|
||||
{{ author }},
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div>
|
||||
<span id="annotation-json-toggle">Annotation JSON (+/-):</span> <span id="annotation-json-content"><pre>{{ question.image_annotations }}</pre></span>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#annotation-json-toggle").click(() => { $("#annotation-json-content").toggle() });
|
||||
|
||||
// send request to change the is_private state on customSwitches toggle
|
||||
$("#save-annotations").click(function () {
|
||||
json = getJsonToolStateNoId();
|
||||
|
||||
+2
-2
@@ -296,8 +296,8 @@ def postExamAnswers(request):
|
||||
# return render(request, "anatomy/exam.html", {"exam" : exam, "question" : question})
|
||||
|
||||
|
||||
#@user_passes_test(user_is_admin, login_url="/accounts/login")
|
||||
@login_required
|
||||
@user_passes_test(user_is_admin, login_url="/accounts/login")
|
||||
def mark_overview(request, pk):
|
||||
exam = get_object_or_404(Exam, pk=pk)
|
||||
|
||||
@@ -309,8 +309,8 @@ def mark_overview(request, pk):
|
||||
})
|
||||
|
||||
|
||||
#@user_passes_test(user_is_admin, login_url="/accounts/login")
|
||||
@login_required
|
||||
@user_passes_test(user_is_admin, login_url="/accounts/login")
|
||||
def mark(request, pk, sk):
|
||||
exam = get_object_or_404(Exam, pk=pk)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user