diff --git a/anatomy/templates/anatomy/base.html b/anatomy/templates/anatomy/base.html
index c1102cc7..9be5603e 100644
--- a/anatomy/templates/anatomy/base.html
+++ b/anatomy/templates/anatomy/base.html
@@ -1,21 +1,25 @@
{% extends 'base.html' %}
{% block title %}
-Anatomy
+ Anatomy
{% endblock %}
{% block navigation %}
-Anatomy:
-{% if request.user.is_authenticated %}
-Packets /
-Exams /
-Create Exam /
-Questions /
-Create Question
-{% if request.user.is_superuser %}
- / Answers
-{% endif %}
-{% endif %}
+ Anatomy:
+ {% if request.user.is_authenticated %}
+ Packets /
+ Exams /
+ Create Exam /
+ Questions /
+ Create Question
+ {% if request.user.is_superuser %}
+ / Answers
+ {% endif %}
+ {% endif %}
{% endblock %}
{% block content %}
-{% endblock %}
\ No newline at end of file
+ {% if simple_content %}
+ {{simple_content}}
+ {% endif %}
+
+{% endblock %}
diff --git a/anatomy/urls.py b/anatomy/urls.py
index a8c083c7..bdd8ed6f 100644
--- a/anatomy/urls.py
+++ b/anatomy/urls.py
@@ -78,9 +78,16 @@ urlpatterns = [
),
path(
"exam//scores",
- cache_page(60 * 1)(views.exam_scores_cid),
+ views.exam_scores_cid,
+ # cache_page(60 * 1)(views.exam_scores_cid),
name="exam_scores_cid",
),
+ path(
+ "exam//scores/refresh",
+ views.exam_scores_refresh,
+ # cache_page(60 * 1)(views.exam_scores_cid),
+ name="exam_scores_refresh",
+ ),
path(
"exam//scores///",
views.exam_scores_cid_user,
diff --git a/anatomy/views.py b/anatomy/views.py
index 4ab21484..a49bd4b3 100644
--- a/anatomy/views.py
+++ b/anatomy/views.py
@@ -450,6 +450,30 @@ def mark(request, exam_pk, sk, unmarked_exam_answers_only=True, review=False):
},
)
+@login_required
+def exam_scores_refresh(request, pk):
+ exam = get_object_or_404(Exam, pk=pk)
+
+ if not exam.exam_mode:
+ raise Http404("Packet not in exam mode")
+
+ questions = exam.exam_questions.all()
+
+ cids = (
+ CidUserAnswer.objects.filter(question__in=questions, exam__id=pk)
+ )
+
+ # Force a score update
+ for c in cids:
+ c.get_answer_score(cached=False)
+
+ return render(
+ request,
+ "anatomy/base.html",
+ {
+ "simple_content": "Answer scores updated",
+ },
+ )
@login_required
def exam_scores_cid(request, pk):