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