fix longs tests
This commit is contained in:
@@ -13,38 +13,34 @@
|
||||
</div>
|
||||
<div class="longs">
|
||||
{% include 'user_score_header.html' %}
|
||||
<ul>
|
||||
{% for score in answers_marks %}
|
||||
<li class="user-answer-li">Question {{forloop.counter}}</li>
|
||||
<span class="user-answer-score user-answer-score-{{score}}">
|
||||
<pre>{{ans}}</pre> ({{score}})
|
||||
</span>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div>
|
||||
<h4>Answers</h4>
|
||||
<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"
|
||||
data-qn={{forloop.counter0}}>View</span></li>
|
||||
|
||||
<ul>
|
||||
<li class="user-answer-li">Observation</br>
|
||||
<pre>{{a}}</pre>
|
||||
{% comment %} <h4>Answers</h4> {% endcomment %}
|
||||
<ul class="score-answer-list">
|
||||
{% for ans, score, correct_answer in answers_and_marks %}
|
||||
<li class="user-answer-li" data-question-number="{{forloop.counter}}"><b>Question {{forloop.counter}}</b> <span class="view-question-link-longs"
|
||||
data-qn={{forloop.counter0}}>View</span>
|
||||
<ul>
|
||||
<li class="Observations" data-qidn="1">Observations</br>
|
||||
<pre>{{ans.0}}</pre>
|
||||
</li>
|
||||
<li class="Interpretation" data-qidn="2">Interpretation</br>
|
||||
<pre>{{ans.1}}</pre>
|
||||
</li>
|
||||
<li class="Principle Diagnosis" data-qidn="3">Principle Diagnosis</br>
|
||||
<pre>{{ans.2}}</pre>
|
||||
</li>
|
||||
<li class="Differential Diagnosis" data-qidn="4">Differential Diagnosis</br>
|
||||
<pre>{{ans.3}}</pre>
|
||||
</li>
|
||||
<li class="Management" data-qidn="5">Management</br>
|
||||
<pre>{{ans.4}}</pre>
|
||||
</li>
|
||||
{% if exam.publish_results %}
|
||||
<span class="answer-score">{{score}}</span>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
<li class="user-answer-li">Interpretation</br>
|
||||
<pre>{{b}}</pre>
|
||||
</li>
|
||||
<li class="user-answer-li">Principle Diagnosis</br>
|
||||
<pre>{{c}}</pre>
|
||||
</li>
|
||||
<li class="user-answer-li">Differential Diagnosis</br>
|
||||
<pre>{{d}}</pre>
|
||||
</li>
|
||||
<li class="user-answer-li">Management</br>
|
||||
<pre>{{e}}</pre>
|
||||
</li>
|
||||
</ul>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
@@ -73,42 +69,42 @@
|
||||
})
|
||||
// $.ajax().done(), $.ajax().fail(), $ajax().always() are upto you. Add/change accordingly
|
||||
.done(function (data) {
|
||||
console.log(data);
|
||||
console.log(data);
|
||||
|
||||
let event = new CustomEvent('loadDicomViewerUrls', {
|
||||
"detail": {
|
||||
"images": data.images[0],
|
||||
"annotations": data.annotations
|
||||
}
|
||||
});
|
||||
let event = new CustomEvent('loadDicomViewerUrls', {
|
||||
"detail": {
|
||||
"images": data.images[0],
|
||||
"annotations": data.annotations
|
||||
}
|
||||
});
|
||||
|
||||
window.dispatchEvent(event);
|
||||
n = parseInt(question_number) + 1
|
||||
$(".question-display-block .question-number").empty().append(n);
|
||||
$("#history").empty().append(data.title);
|
||||
$("#series").empty();
|
||||
data.image_titles.forEach((element, index) => {
|
||||
$("#series").append($(
|
||||
`<span class="image-link" title="click to view">${index + 1}: ${element}</span> `
|
||||
).click(() => {
|
||||
$("#single-dicom-viewer").empty();
|
||||
let event = new CustomEvent('loadDicomViewerUrls', {
|
||||
"detail": {
|
||||
"images": data.images[index],
|
||||
"annotations": data.annotations
|
||||
}
|
||||
});
|
||||
window.dispatchEvent(event);
|
||||
n = parseInt(question_number) + 1
|
||||
$(".question-display-block .question-number").empty().append(n);
|
||||
$("#history").empty().append(data.title);
|
||||
$("#series").empty();
|
||||
data.image_titles.forEach((element, index) => {
|
||||
$("#series").append($(
|
||||
`<span class="image-link" title="click to view">${index + 1}: ${element}</span> `
|
||||
).click(() => {
|
||||
$("#single-dicom-viewer").empty();
|
||||
let event = new CustomEvent('loadDicomViewerUrls', {
|
||||
"detail": {
|
||||
"images": data.images[index],
|
||||
"annotations": data.annotations
|
||||
}
|
||||
});
|
||||
|
||||
window.dispatchEvent(event);
|
||||
window.dispatchEvent(event);
|
||||
|
||||
}));
|
||||
}));
|
||||
|
||||
})
|
||||
$(".inner-display-block").show();
|
||||
})
|
||||
$(".inner-display-block").show();
|
||||
})
|
||||
.always(function () {
|
||||
console.log('[Done]');
|
||||
})
|
||||
console.log('[Done]');
|
||||
})
|
||||
})
|
||||
|
||||
$(".view-question-link").first().click();
|
||||
|
||||
Reference in New Issue
Block a user