diff --git a/anatomy/static/css/anatomy.css b/anatomy/static/css/anatomy.css
index 1e11802d..77f71554 100644
--- a/anatomy/static/css/anatomy.css
+++ b/anatomy/static/css/anatomy.css
@@ -587,24 +587,6 @@ table.longs .user-answer-score- {
background-color: red;
}
-.published-icon {
- border: 1px dotted gray;
- opacity: 20%;
- border-radius: 4px;
- display: none;
-}
-
-.published-icon:hover {
- opacity: 100%;
-}
-
-.published-icon.published {
- border: 1px solid purple;
- color: purple;
- opacity: 100%;
- display: inline-block;
-}
-
textarea,
input {
border-radius: 2px;
diff --git a/anatomy/views.py b/anatomy/views.py
index 8135da10..ab4f53c6 100644
--- a/anatomy/views.py
+++ b/anatomy/views.py
@@ -664,6 +664,7 @@ def exam_scores_cid_user(request, pk, cid, passcode):
"total_score": total_score,
"max_score": max_score,
"answers_and_marks": answers_and_marks,
+ "view_all_results": view_all_results,
},
)
diff --git a/generic/templates/generic/user_scores_header.html b/generic/templates/generic/user_scores_header.html
new file mode 100644
index 00000000..45b56ffa
--- /dev/null
+++ b/generic/templates/generic/user_scores_header.html
@@ -0,0 +1,7 @@
+
+ Exam state: Active [{{exam.active}}] / Published [{{exam.publish_results}}]
+
+{% endif %}
\ No newline at end of file
diff --git a/generic/views.py b/generic/views.py
index 12658a0c..3fac5537 100644
--- a/generic/views.py
+++ b/generic/views.py
@@ -362,7 +362,7 @@ class ExamViews(View, LoginRequiredMixin):
True if request.POST.get("publish_results") == "true" else False
)
exam.save()
- data = {"status": "success", "publish_results": exam.publish_results}
+ data = {"status": "success", "publish_results": exam.publish_results, "name": exam.name, "id": exam.id}
return JsonResponse(data, status=200)
else:
data = {"status": "error"}
@@ -376,7 +376,7 @@ class ExamViews(View, LoginRequiredMixin):
exam.active = True if request.POST.get("active") == "true" else False
exam.save()
- data = {"status": "success", "active": exam.active}
+ data = {"status": "success", "active": exam.active, "name": exam.name, "id": exam.id}
return JsonResponse(data, status=200)
else:
data = {"status": "error"}
diff --git a/longs/views.py b/longs/views.py
index d2b09505..30dff861 100755
--- a/longs/views.py
+++ b/longs/views.py
@@ -1121,8 +1121,9 @@ def exam_scores_cid_user(request, pk, cid, passcode):
"total_score": total_score,
"normalised_score": normalised_score,
"max_score": max_score,
- "answer_text": answer_text
+ "answer_text": answer_text,
# "answers_and_marks": answers_and_marks,
+ "view_all_results": view_all_results,
},
)
diff --git a/physics/templates/physics/exam_list.html b/physics/templates/physics/exam_list.html
index 68543005..af6ad227 100644
--- a/physics/templates/physics/exam_list.html
+++ b/physics/templates/physics/exam_list.html
@@ -8,7 +8,10 @@
{% for exam in exams %}
{% if exam.active %}
- {% if can_edit %}
-
Edit
-
Delete
-
Clone
- {% endif %}
- {% if request.user.is_superuser %}
-
Admin Edit
- {% endif %}
-
Exam: {{ exam.name }}
+{% load thumbnail %}
+
+ {% if can_edit %}
+
Edit
+
Delete
+
Clone
+ {% endif %}
+ {% if request.user.is_superuser %}
+
Admin
+ Edit
+ {% endif %}
+
Exam: {{ exam.name }}
- {% include 'exam_notes.html' %}
+ {% include 'exam_notes.html' %}
-
This exam has {{question_number}} questions.
- Open access: {{ exam.open_access }}
-
-
- Exam active: [When checked the exam will be available to take in the test system]
-
-
- Publish results: [When checked the exam results will be available on this site]
-
- This exam will be available to take
here (when active).
-
- {% autoescape off %}
-
- {% for question in questions.all %}
-
- -
- {{ question.stem }}
-
- -
- {{ question.a }}: {{ question.a_answer }}
-
- -
- {{ question.b }}: {{ question.b_answer }}
-
- -
- {{ question.c }}: {{ question.c_answer }}
-
- -
- {{ question.d }}: {{ question.d_answer }}
-
- -
- {{ question.e }}: {{ question.e_answer }}
-
-
- Category: {{ question.category }}, View Edit
-
-
- {% endfor %}
-
- {% endautoescape %}
+
This exam has {{question_number}} questions.
+ Open access: {{ exam.open_access }}
+
+ Exam active: [When checked the exam will be available to take in the test system]
-
-{% endblock %}
+
+ {{ question.stem }}
+
+ -
+ {{ question.a }}: {{ question.a_answer }}
+
+ -
+ {{ question.b }}: {{ question.b_answer }}
+
+ -
+ {{ question.c }}: {{ question.c_answer }}
+
+ -
+ {{ question.d }}: {{ question.d_answer }}
+
+ -
+ {{ question.e }}: {{ question.e_answer }}
+
+
+ Category: {{ question.category }}, View Edit
+
+
+ {% endfor %}
+
+ {% endautoescape %}
+
+
+ {% include 'exam_overview_js.html' %}
+{% endblock %}
\ No newline at end of file
diff --git a/physics/templates/physics/exam_scores_user.html b/physics/templates/physics/exam_scores_user.html
index b8691ceb..faf9df70 100644
--- a/physics/templates/physics/exam_scores_user.html
+++ b/physics/templates/physics/exam_scores_user.html
@@ -2,8 +2,8 @@
{% block content %}
-
Exam: {{ exam.name }}
-
Candidate: {{ cid }}
+ {% include 'generic/user_scores_header.html' %}
+
Answers:
{% for question, ans in answers_and_marks %}
diff --git a/physics/views.py b/physics/views.py
index f9e37df6..c29cc4d7 100644
--- a/physics/views.py
+++ b/physics/views.py
@@ -146,6 +146,7 @@ def exam_scores_cid_user(request, pk, cid, passcode):
"total_score": total_score,
"max_score": max_score,
"answers_and_marks": answers_and_marks,
+ "view_all_results": view_all_results,
},
)
diff --git a/rapids/views.py b/rapids/views.py
index 812f4018..e3e368c7 100755
--- a/rapids/views.py
+++ b/rapids/views.py
@@ -1038,6 +1038,7 @@ def exam_scores_cid_user(request, pk, cid, passcode):
"normalised_score": normalised_score,
"max_score": max_score,
"answers_and_marks": answers_and_marks,
+ "view_all_results": view_all_results,
},
)
diff --git a/sbas/views.py b/sbas/views.py
index fe3589d5..eb1faab6 100644
--- a/sbas/views.py
+++ b/sbas/views.py
@@ -138,6 +138,7 @@ def exam_scores_cid_user(request, pk, cid, passcode):
"total_score": total_score,
"max_score": max_score,
"answers_and_marks": answers_and_marks,
+ "view_all_results": view_all_results,
},
)
diff --git a/static/css/anatomy.css b/static/css/anatomy.css
index 1e11802d..77f71554 100644
--- a/static/css/anatomy.css
+++ b/static/css/anatomy.css
@@ -587,24 +587,6 @@ table.longs .user-answer-score- {
background-color: red;
}
-.published-icon {
- border: 1px dotted gray;
- opacity: 20%;
- border-radius: 4px;
- display: none;
-}
-
-.published-icon:hover {
- opacity: 100%;
-}
-
-.published-icon.published {
- border: 1px solid purple;
- color: purple;
- opacity: 100%;
- display: inline-block;
-}
-
textarea,
input {
border-radius: 2px;
diff --git a/templates/exam_list.html b/templates/exam_list.html
index 37418305..0efeea7c 100644
--- a/templates/exam_list.html
+++ b/templates/exam_list.html
@@ -7,12 +7,15 @@
+ {% include 'exam_overview_js.html' %}
+
+
+
{% endblock %}
+
diff --git a/templates/exam_overview_js.html b/templates/exam_overview_js.html
index 806fe3d3..6fc26f9d 100644
--- a/templates/exam_overview_js.html
+++ b/templates/exam_overview_js.html
@@ -1,7 +1,7 @@