diff --git a/anatomy/static/css/anatomy.css b/anatomy/static/css/anatomy.css
index d4f54d34..7d74dba0 100644
--- a/anatomy/static/css/anatomy.css
+++ b/anatomy/static/css/anatomy.css
@@ -21,7 +21,8 @@ a, a:link {
.answer-list .answer:hover{
z-index: 99999;
- color:rgba(142, 68, 173, 1);
+ position: relative;
+ background: rgba(167, 167, 167, 0.7);
}
.answer-list .correct {
@@ -153,7 +154,6 @@ button a {
#dicom-image {
width: 100%;
height: 600px;
- z-index: 0;
}
#dicom-image.marking-dicom {
@@ -162,7 +162,7 @@ button a {
bottom: 0px;
width: 50%;
height: 90%;
-
+ z-index: 1;
}
.marking {
diff --git a/anatomy/templates/anatomy/exam_scores.html b/anatomy/templates/anatomy/exam_scores.html
index 5bc70ed6..8b61b5ac 100644
--- a/anatomy/templates/anatomy/exam_scores.html
+++ b/anatomy/templates/anatomy/exam_scores.html
@@ -14,10 +14,11 @@
-
Stats
+
Stats
+ Max score: {{max_score}}
Mean: {{mean}}, Median {{median}}, Mode {{mode}}
-
Distribution of results
{{plot|safe}}
+
{{plot|safe}}
@@ -51,6 +52,12 @@
{% endfor %}
{% endfor %}
+
+ | Score: |
+ {% for score in user_scores %}
+ {{score}} |
+ {% endfor %}
+
diff --git a/anatomy/views.py b/anatomy/views.py
index 19561b38..213e7446 100644
--- a/anatomy/views.py
+++ b/anatomy/views.py
@@ -108,6 +108,7 @@ def question_detail(request, pk):
return render(request, "anatomy/question_detail.html", {"question": question})
+
@login_required
def exam_question_detail(request, pk, sk):
exam = get_object_or_404(Exam, pk=pk)
@@ -120,12 +121,23 @@ def exam_question_detail(request, pk, sk):
previous = -1
if sk > 0:
- previous = sk-1
- next = sk+1
- if sk == exam_length-1:
+ previous = sk - 1
+ next = sk + 1
+ if sk == exam_length - 1:
next = False
- return render(request, "anatomy/question_detail.html", {"question": question, "exam": exam, "next" : next, "previous" : previous, "exam_length" : exam_length, "pos": pos})
+ return render(
+ request,
+ "anatomy/question_detail.html",
+ {
+ "question": question,
+ "exam": exam,
+ "next": next,
+ "previous": previous,
+ "exam_length": exam_length,
+ "pos": pos,
+ },
+ )
@login_required
@@ -685,7 +697,7 @@ def exam_scores_cid(request, pk):
)
fig_html = fig.to_html()
- total = len(questions)
+ max_score = len(questions) * 2
return render(
request,
@@ -698,9 +710,10 @@ def exam_scores_cid(request, pk):
"by_question": by_question,
"user_answers": dict(user_answers),
"user_answers_marks": dict(user_answers_marks),
- "user_scores": user_scores,
+ "user_scores": user_scores_list,
"user_names": user_names,
"user_answers_and_marks": user_answers_and_marks,
+ "max_score": max_score,
"mean": mean,
"median": median,
"mode": mode,
@@ -894,18 +907,17 @@ class AnatomyQuestionCreateBase(LoginRequiredMixin, CreateView):
return response
# else we redirect to the clone url
else:
- return redirect(
- "anatomy:question_clone", pk=self.object.pk
- )
+ return redirect("anatomy:question_clone", pk=self.object.pk)
else:
return super().form_invalid(form)
+
@login_required
def question_clone(request, pk):
new_item = get_object_or_404(AnatomyQuestion, pk=pk)
- new_item.pk = None #autogen a new pk (item_id)
- #new_item.name = "Copy of " + new_item.name #need to change uniques
+ new_item.pk = None # autogen a new pk (item_id)
+ # new_item.name = "Copy of " + new_item.name #need to change uniques
form = AnatomyQuestion(request.POST or None, instance=new_item)
@@ -914,7 +926,7 @@ def question_clone(request, pk):
if form.is_valid():
form.instance.author.add(request.user.id)
- #logger.debug(formset.is_valid())
+ # logger.debug(formset.is_valid())
if formset.is_valid():
response = super().form_valid(form)
formset.instance = obj
@@ -926,7 +938,7 @@ def question_clone(request, pk):
context = {
"form": form,
"answer_formset": formset
- #other context
+ # other context
}
return render(request, "anatomy/anatomyquestion_form.html", context)
@@ -998,6 +1010,7 @@ class AnatomyQuestionUpdate(LoginRequiredMixin, UpdateView):
class QuestionClone(AnatomyQuestionCreateBase):
"""Clones a existing rapid"""
+
# fields = '__all__'
# #fields = [ 'condition' ]
# #initial = {'date_of_death': '05/01/2018'}
diff --git a/templates/base.html b/templates/base.html
index 84721a2c..f79f365d 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -3,9 +3,10 @@
Penra Courses
+
-
+