.
This commit is contained in:
@@ -741,6 +741,10 @@ input {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inner-display-block {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.hide-show{
|
.hide-show{
|
||||||
float: right;
|
float: right;
|
||||||
transform: rotate(90deg) translateX(10px);
|
transform: rotate(90deg) translateX(10px);
|
||||||
|
|||||||
@@ -2,12 +2,15 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="question-display-block">
|
<div class="question-display-block">
|
||||||
Question <span class="question-number">1</span><br/>
|
Question <span class="question-number">No question loaded</span><br/>
|
||||||
<span id="question-title"></span><br/>
|
<div class="hide-show">HIDE/SHOW</div>
|
||||||
<span id="question-question"></span>
|
<div class="inner-display-block">
|
||||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
|
<span id="question-title"></span><br/>
|
||||||
|
<span id="question-question"></span>
|
||||||
|
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
|
||||||
|
</div>
|
||||||
|
<div class="answers">Answers: </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="answers">Answers: </div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="anatomy">
|
<div class="anatomy">
|
||||||
<h2>Exam: {{ exam.name }}</h2>
|
<h2>Exam: {{ exam.name }}</h2>
|
||||||
@@ -31,6 +34,10 @@
|
|||||||
{% block js %}
|
{% block js %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
$(".hide-show").click((evt, el) => {
|
||||||
|
$(".inner-display-block").toggle();
|
||||||
|
})
|
||||||
|
|
||||||
$(".view-question-link").on("click", function (e) {
|
$(".view-question-link").on("click", function (e) {
|
||||||
console.log("click", e)
|
console.log("click", e)
|
||||||
question_number = e.currentTarget.dataset.qn;
|
question_number = e.currentTarget.dataset.qn;
|
||||||
@@ -58,8 +65,7 @@
|
|||||||
$("#question-question").empty().append(data.question);
|
$("#question-question").empty().append(data.question);
|
||||||
n = parseInt(question_number) + 1
|
n = parseInt(question_number) + 1
|
||||||
$(".question-display-block .question-number").empty().append(n);
|
$(".question-display-block .question-number").empty().append(n);
|
||||||
// show some message according to the response.
|
$(".inner-display-block").show();
|
||||||
// For eg. A message box showing that the status has been changed
|
|
||||||
})
|
})
|
||||||
.always(function () {
|
.always(function () {
|
||||||
console.log('[Done]');
|
console.log('[Done]');
|
||||||
|
|||||||
@@ -1,73 +1,72 @@
|
|||||||
{% extends 'longs/base.html' %}
|
{% extends 'longs/base.html' %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="question-display-block">
|
<div class="question-display-block">
|
||||||
<div class="hide-show">HIDE/SHOW</div>
|
<div class="hide-show">HIDE/SHOW</div>
|
||||||
<div class="inner-display-block">
|
<div class="inner-display-block">
|
||||||
Question <span class="question-number">1</span><br />
|
Question <span class="question-number">1</span><br />
|
||||||
History: <span id="history"></span><br />
|
History: <span id="history"></span><br />
|
||||||
Images: <span id="series"></span>
|
Images: <span id="series"></span>
|
||||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
|
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="longs">
|
||||||
<div class="longs">
|
<h2>Exam: {{ exam.name }}</h2>
|
||||||
<h2>Exam: {{ exam.name }}</h2>
|
<h3>Candidate: {{ cid }}</h3>
|
||||||
<h3>Candidate: {{ cid }}</h3>
|
Scores:
|
||||||
Scores:
|
<ul>{% for score in answers_marks %}
|
||||||
<ul>{% for score in answers_marks %}
|
<li class="user-answer-li">Question {{forloop.counter}}</li>
|
||||||
<li class="user-answer-li">Question {{forloop.counter}}</li>
|
<span class="user-answer-score user-answer-score-{{score}}">
|
||||||
<span class="user-answer-score user-answer-score-{{score}}">
|
<pre>{{ans}}</pre> ({{score}})</span>
|
||||||
<pre>{{ans}}</pre> ({{score}})</span>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<br /> Total mark: {{ total_score }} / {{max_score}}
|
<br /> Total mark: {{ total_score }} / {{max_score}}
|
||||||
<br /> Normalised score: {{normalised_score}}
|
<br /> Normalised score: {{normalised_score}}
|
||||||
<div>
|
<div>
|
||||||
<h4>Answers</h4>
|
<h4>Answers</h4>
|
||||||
<ul class="long-answer">{% for a,b,c,d,e in answer_text %}
|
<ul class="long-answer">{% for a,b,c,d,e in answer_text %}
|
||||||
<li class="user-answer-li"><b>Question {{forloop.counter}}</b> <span class="view-question-link-longs"
|
<li class="user-answer-li"><b>Question {{forloop.counter}}</b> <span class="view-question-link-longs"
|
||||||
data-qn={{forloop.counter0}}>View</span></li>
|
data-qn={{forloop.counter0}}>View</span></li>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li class="user-answer-li">Observation</br>
|
<li class="user-answer-li">Observation</br>
|
||||||
<pre>{{a}}</pre>
|
<pre>{{a}}</pre>
|
||||||
</li>
|
</li>
|
||||||
<li class="user-answer-li">Interpretation</br>
|
<li class="user-answer-li">Interpretation</br>
|
||||||
<pre>{{b}}</pre>
|
<pre>{{b}}</pre>
|
||||||
</li>
|
</li>
|
||||||
<li class="user-answer-li">Principle Diagnosis</br>
|
<li class="user-answer-li">Principle Diagnosis</br>
|
||||||
<pre>{{c}}</pre>
|
<pre>{{c}}</pre>
|
||||||
</li>
|
</li>
|
||||||
<li class="user-answer-li">Differential Diagnosis</br>
|
<li class="user-answer-li">Differential Diagnosis</br>
|
||||||
<pre>{{d}}</pre>
|
<pre>{{d}}</pre>
|
||||||
</li>
|
</li>
|
||||||
<li class="user-answer-li">Management</br>
|
<li class="user-answer-li">Management</br>
|
||||||
<pre>{{e}}</pre>
|
<pre>{{e}}</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="{% url 'cid_scores' cid %}">Other exams</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<a href="{% url 'cid_scores' cid %}">Other exams</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block js %}
|
{% block js %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$(".hide-show").click((evt, el) => {
|
$(".hide-show").click((evt, el) => {
|
||||||
$(".inner-display-block").toggle();
|
$(".inner-display-block").toggle();
|
||||||
|
})
|
||||||
|
|
||||||
})
|
$(".view-question-link-longs").on("click", function (e) {
|
||||||
|
console.log("click", e)
|
||||||
$(".view-question-link-longs").on("click", function (e) {
|
question_number = e.currentTarget.dataset.qn;
|
||||||
console.log("click", e)
|
$("#single-dicom-viewer").empty();
|
||||||
question_number = e.currentTarget.dataset.qn;
|
$.ajax({
|
||||||
$("#single-dicom-viewer").empty();
|
|
||||||
$.ajax({
|
|
||||||
url: `{% url 'longs:question_review' pk=exam.pk %}`,
|
url: `{% url 'longs:question_review' pk=exam.pk %}`,
|
||||||
data: {
|
data: {
|
||||||
csrfmiddlewaretoken: "{{ csrf_token }}",
|
csrfmiddlewaretoken: "{{ csrf_token }}",
|
||||||
@@ -77,7 +76,7 @@
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
})
|
})
|
||||||
// $.ajax().done(), $.ajax().fail(), $ajax().always() are upto you. Add/change accordingly
|
// $.ajax().done(), $.ajax().fail(), $ajax().always() are upto you. Add/change accordingly
|
||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
||||||
let event = new CustomEvent('loadDicomViewerUrls', {
|
let event = new CustomEvent('loadDicomViewerUrls', {
|
||||||
@@ -109,16 +108,15 @@
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
})
|
})
|
||||||
// show some message according to the response.
|
$(".inner-display-block").show();
|
||||||
// For eg. A message box showing that the status has been changed
|
|
||||||
})
|
})
|
||||||
.always(function () {
|
.always(function () {
|
||||||
console.log('[Done]');
|
console.log('[Done]');
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
$(".view-question-link").first().click();
|
$(".view-question-link").first().click();
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -741,6 +741,10 @@ input {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inner-display-block {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.hide-show{
|
.hide-show{
|
||||||
float: right;
|
float: right;
|
||||||
transform: rotate(90deg) translateX(10px);
|
transform: rotate(90deg) translateX(10px);
|
||||||
|
|||||||
Reference in New Issue
Block a user