.
This commit is contained in:
+117
-115
@@ -1,135 +1,137 @@
|
|||||||
{% extends 'rapids/exams.html' %}
|
{% extends 'rapids/exams.html' %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h2>{% if review %}Reviewing{% else %}Marking{% endif %} question {{question_details.current}} of {{question_details.total}}</h2>
|
<h2>{% if review %}Reviewing{% else %}Marking{% endif %} question {{question_details.current}} of {{question_details.total}}</h2>
|
||||||
<a href="{% url 'rapids:question_detail' question.id %}" title="View the Question">View</a> <a
|
<a href="{% url 'rapids:question_detail' question.id %}" title="View the Question">View</a> <a
|
||||||
href="{% url 'rapids:rapid_update' question.id %}" title="Edit the Question">Edit</a> <a
|
href="{% url 'rapids:rapid_update' question.id %}" title="Edit the Question">Edit</a> <a
|
||||||
href="{% url 'admin:rapids_rapid_change' question.id %}" title="Edit the Question using the admin interface">Admin
|
href="{% url 'admin:rapids_rapid_change' question.id %}" title="Edit the Question using the admin interface">Admin
|
||||||
Edit</a>
|
Edit</a>
|
||||||
{% if unmarked_answers_bool %}
|
{% if unmarked_answers_bool %}
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning" role="alert">
|
||||||
This questions has unmarked answers. Are you sure you want to review?
|
This questions has unmarked answers. Are you sure you want to review?
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
{% if question.normal %}
|
|
||||||
<h3>This question is normal</h3>
|
|
||||||
Answers will be automatically marked.<br />
|
|
||||||
|
|
||||||
{% if incorrect_answers %}
|
|
||||||
<p>The following answers have been submitted for this question</p>
|
|
||||||
<div class="marking-list">
|
|
||||||
<ul id="new-answer-list" class="answer-list rapid">
|
|
||||||
{% for answer in incorrect_answers %}
|
|
||||||
<li>
|
|
||||||
<pre><span class="answer incorrect" title="{{answer}}">{{ answer }}</span></pre>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% if question.normal %}
|
||||||
<h3>This question is abnormal</h3>
|
<h3>This question is normal</h3>
|
||||||
Answers marked as normal will be automatically marked.<br />
|
Answers will be automatically marked.<br />
|
||||||
Region: {{ question.get_regions }}, Abnormalities: {{ question.get_abnormalities }}
|
|
||||||
{% endif %}
|
|
||||||
<div class="marking">
|
|
||||||
<form method="POST" class="post-form">{% csrf_token %}
|
|
||||||
{% if not question.normal %}
|
|
||||||
Click each answer to toggle through marks awarded (as per colour)<br/>
|
|
||||||
{% if not review %}
|
|
||||||
{% if unmarked_exam_answers_only %}
|
|
||||||
Showing exam answers only <a href="{% url 'rapids:mark_all' exam.id question_number %}">(view all)</a>
|
|
||||||
{% else %}
|
|
||||||
Showing all answers <a href="{% url 'rapids:mark' exam.id question_number %}">(view unmarked exam answers)</a>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if incorrect_answers %}
|
||||||
|
<p>The following answers have been submitted for this question</p>
|
||||||
<div class="marking-list">
|
<div class="marking-list">
|
||||||
{% if not review %}
|
<ul id="new-answer-list" class="answer-list rapid">
|
||||||
Unmarked:
|
{% for answer in incorrect_answers %}
|
||||||
<ul id="new-answer-list" class="answer-list rapid">
|
<li>
|
||||||
{% for answer in user_answers %}
|
<pre><span class="answer incorrect" title="{{answer}}">{{ answer }}</span></pre>
|
||||||
<li>
|
</li>
|
||||||
<pre><span class="answer not-marked">{{ answer }}</span></pre>
|
{% endfor %}
|
||||||
</li>
|
</ul>
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
Marked:
|
|
||||||
<ul id="marked-answer-list" class="answer-list rapid">
|
|
||||||
{% for answer in correct_answers %}
|
|
||||||
<li>
|
|
||||||
<pre><span class="answer correct" title="{{answer}}">{{ answer }}</span></pre>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
{% for answer in half_mark_answers %}
|
|
||||||
<li>
|
|
||||||
<pre><span class="answer half-correct" title="{{answer}}">{{ answer }}</span></pre>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
{% for answer in incorrect_answers %}
|
|
||||||
<li>
|
|
||||||
<pre><span class="answer incorrect" title="{{answer}}">{{ answer }}</span></pre>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% else %}
|
|
||||||
To review:
|
|
||||||
<ul id="new-answer-list" class="answer-list rapid">
|
|
||||||
{% for answer, mark in review_user_answers %}
|
|
||||||
<li>
|
|
||||||
<pre><span class="answer not-marked" data-mark="{{mark}}">{{ answer }}</span></pre>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
<div class="answer-list key">Key: <span class="correct">2 Marks</span>, <span class="half-correct">1
|
|
||||||
Mark</span>, <span class="incorrect">0 Marks</span></div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if review and not question.normal %}
|
{% else %}
|
||||||
<button type="button" name="check-review" class="check-review">Check review answers</button><br/>
|
<h3>This question is abnormal</h3>
|
||||||
{% endif %}
|
Answers given as normal will be automatically marked.<br />
|
||||||
<span class="save-buttons">
|
Region: {{ question.get_regions }}, Abnormalities: {{ question.get_abnormalities }}
|
||||||
{% if question_details.current > 1 %}
|
{% endif %}
|
||||||
<button type="submit" name="previous" class="save btn btn-default">Previous</button>
|
<div class="marking">
|
||||||
|
<form method="POST" class="post-form">{% csrf_token %}
|
||||||
|
{% if not question.normal %}
|
||||||
|
Click each answer to toggle through marks awarded (as per colour)<br/>
|
||||||
|
{% if not review %}
|
||||||
|
{% if unmarked_exam_answers_only %}
|
||||||
|
Showing unmarked exam answers only <a href="{% url 'rapids:mark_all' exam.id question_number %}">(view all answers for question)</a>
|
||||||
|
{% else %}
|
||||||
|
Showing all answers <a href="{% url 'rapids:mark' exam.id question_number %}">(view unmarked exam answers only)</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="marking-list">
|
||||||
|
{% if not review %}
|
||||||
|
Unmarked:
|
||||||
|
<ul id="new-answer-list" class="answer-list rapid">
|
||||||
|
{% for answer in user_answers %}
|
||||||
|
<li>
|
||||||
|
<pre><span class="answer not-marked">{{ answer }}</span></pre>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{% if not unmarked_exam_answers_only %}
|
||||||
|
Marked:
|
||||||
|
<ul id="marked-answer-list" class="answer-list rapid">
|
||||||
|
{% for answer in correct_answers %}
|
||||||
|
<li>
|
||||||
|
<pre><span class="answer correct" title="{{answer}}">{{ answer }}</span></pre>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
{% for answer in half_mark_answers %}
|
||||||
|
<li>
|
||||||
|
<pre><span class="answer half-correct" title="{{answer}}">{{ answer }}</span></pre>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
{% for answer in incorrect_answers %}
|
||||||
|
<li>
|
||||||
|
<pre><span class="answer incorrect" title="{{answer}}">{{ answer }}</span></pre>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
To review:
|
||||||
|
<ul id="new-answer-list" class="answer-list rapid">
|
||||||
|
{% for answer, mark in review_user_answers %}
|
||||||
|
<li>
|
||||||
|
<pre><span class="answer not-marked" data-mark="{{mark}}">{{ answer }}</span></pre>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
<div class="answer-list key">Key: <span class="correct">2 Marks</span>, <span class="half-correct">1
|
||||||
|
Mark</span>, <span class="incorrect">0 Marks</span></div>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<button type="submit" name="save" class="save btn btn-default">Save</button>
|
{% if review and not question.normal %}
|
||||||
{% if question_details.current >= question_details.total %}
|
<button type="button" name="check-review" class="check-review">Check review answers</button><br/>
|
||||||
{% else %}
|
|
||||||
<button type="submit" name="next" class="save btn btn-default">Next</button>
|
|
||||||
<button type="submit" name="skip" class="save btn btn-default">Skip</button>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
<span class="save-buttons">
|
||||||
<span class=hide>
|
{% if question_details.current > 1 %}
|
||||||
{{ form.as_p }}
|
<button type="submit" name="previous" class="save btn btn-default">Previous</button>
|
||||||
</span>
|
{% endif %}
|
||||||
</form>
|
<button type="submit" name="save" class="save btn btn-default">Save</button>
|
||||||
|
{% if question_details.current >= question_details.total %}
|
||||||
|
{% else %}
|
||||||
|
<button type="submit" name="next" class="save btn btn-default">Next</button>
|
||||||
|
<button type="submit" name="skip" class="save btn btn-default">Skip</button>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
<span class=hide>
|
||||||
|
{{ form.as_p }}
|
||||||
|
</span>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-md-6">
|
||||||
<div class="col-md-6">
|
<div id="single-dicom-viewer" class="marking-dicom" data-images="{{question.get_image_url_array}}"
|
||||||
<div id="single-dicom-viewer" class="marking-dicom" data-images="{{question.get_image_url_array}}"
|
data-annotations='{{question.get_image_annotations}}'>
|
||||||
data-annotations='{{question.get_image_annotations}}'>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{% if review and not question.normal %}
|
{% if review and not question.normal %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(() => {
|
$(document).ready(() => {
|
||||||
$("button.check-review").click(() =>{
|
$("button.check-review").click(() =>{
|
||||||
$(".marking-list .answer").each((n, el) => {
|
$(".marking-list .answer").each((n, el) => {
|
||||||
console.log(n, el, el.dataset);
|
console.log(n, el, el.dataset);
|
||||||
if (el.dataset.mark != el.dataset.newmark) {
|
if (el.dataset.mark != el.dataset.newmark) {
|
||||||
$(el).after(`<span class="current-mark"> saved mark [${el.dataset.mark}]</span>`)
|
$(el).after(`<span class="current-mark"> saved [${el.dataset.mark}]</span>`)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
$("button.check-review").after("Discreptant answers are show above. Click next / save to update you your answers").hide()
|
||||||
|
$(".save-buttons").show();
|
||||||
})
|
})
|
||||||
$("button.check-review").after("Discreptant answers are show above. Click next / save to update you your answers").hide()
|
|
||||||
$(".save-buttons").show();
|
|
||||||
})
|
|
||||||
|
|
||||||
$(".save-buttons").hide();
|
$(".save-buttons").hide();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user