.
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
{% extends 'longs/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="question-display-block">
|
||||
Question <span class="question-number">1</span>
|
||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
|
||||
</div>
|
||||
<div class="answers">Answers: </div>
|
||||
</div>
|
||||
<div class="longs">
|
||||
<h2>Exam: {{ exam.name }}</h2>
|
||||
<h3>Candidate: {{ cid }}</h3>
|
||||
Scores:
|
||||
<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>
|
||||
<span class="user-answer-score user-answer-score-{{score}}">
|
||||
<pre>{{ans}}</pre> ({{score}})</span>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<br /> Total mark: {{ total_score }} / {{max_score}}
|
||||
@@ -17,11 +24,21 @@
|
||||
<ul class="long-answer">{% for a,b,c,d,e in answer_text %}
|
||||
<li class="user-answer-li"><b>Question {{forloop.counter}}</b></li>
|
||||
<ul>
|
||||
<li class="user-answer-li">Observation</br><pre>{{a}}</pre></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>
|
||||
<li class="user-answer-li">Observation</br>
|
||||
<pre>{{a}}</pre>
|
||||
</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 %}
|
||||
</ul>
|
||||
|
||||
@@ -61,6 +61,11 @@ urlpatterns = [
|
||||
# path("all_questions/", views.all_questions, name="all_questions"),
|
||||
path("question/<int:pk>/scrap", views.long_scrap, name="long_scrap"),
|
||||
path("question/<int:pk>/delete", views.LongDelete.as_view(), name="long_delete"),
|
||||
path(
|
||||
"exam/<int:pk>/review",
|
||||
views.question_review,
|
||||
name="question_review",
|
||||
),
|
||||
path("exam/<int:pk>/<int:sk>/<int:cid>/mark", views.mark_answer, name="mark_answer"),
|
||||
path("exam/<int:pk>/<int:sk>/mark", views.mark, name="mark"),
|
||||
path("exam/<int:pk>/mark", views.LongExamViews.mark_overview, name="mark_overview"),
|
||||
|
||||
@@ -1143,3 +1143,19 @@ class SeriesImagesZipView(SuperuserRequiredMixin, BaseZipView):
|
||||
series = LongSeries.objects.get(pk=self.kwargs['pk'])
|
||||
|
||||
return [i.image.file for i in series.images.all()]
|
||||
|
||||
def question_review(request, pk):
|
||||
"""
|
||||
Return a json representation of the question when the exam is active
|
||||
"""
|
||||
if request.is_ajax():
|
||||
exam = get_object_or_404(Exam, pk=pk)
|
||||
|
||||
if not exam.publish_results:
|
||||
raise Http404
|
||||
|
||||
question = exam.exam_questions.all()[int(request.POST["question_number"])]
|
||||
|
||||
question_json = question.get_question_json(based=False)
|
||||
return JsonResponse(question_json)
|
||||
return JsonResponse({"status": "error"})
|
||||
|
||||
Reference in New Issue
Block a user