numerous improvements and fixes

This commit is contained in:
Ross
2020-12-26 20:45:26 +00:00
parent 33077cbdd6
commit d47462be98
8 changed files with 34 additions and 41 deletions
+15
View File
@@ -23,14 +23,29 @@ a, a:link {
color: green;
}
.answer-list .correct::after{
content: " [Score = 2]";
font-size: small;
}
.answer-list .half-correct {
color: yellow;
}
.answer-list .half-correct::after{
content: " [Score = 1]";
font-size: small;
}
.answer-list .incorrect {
color: red;
}
.answer-list .incorrect::after{
content: " [Score = 0]";
font-size: small;
}
.answer-list .not-marked {
color: lightblue;
}
+1 -1
View File
@@ -8,7 +8,7 @@ var marked_answers = {
$(document).ready(function () {
$(".answer-list li").each(function (index, element) {
$(element).append($("<span class='google-link' title='search in google'><a href='https://www.google.com/search?q="+$(element).text()+"' target='_blank'>G</a></span>"));
$(element).append($("<span class='google-link' title='search for answer with google'><a href='https://www.google.com/search?q="+$(element).text()+"' target='_blank'>G</a></span>"));
});
$(".answer-list span.answer").each(function (index, element) {
+3 -12
View File
@@ -12,21 +12,12 @@
{% endif %}
{% for user, value in user_answers_marks.items %}
<h3>Candidate: <a href="{% url 'cid_scores' user %}">{{ user_names|get_item:user }}</a></h3>
<!-- Answers: {{ user_answers_and_marks|get_item:user }}-->
Answers: {% for ans, score in user_answers_and_marks|get_item:user %}
{{ans}} ({{score}}),
{% endfor %}
<br /> Total mark: {{ user_scores|get_item:user }}
{% endfor %}
</div>
<div id="stats-block">
<h2>Stats</h2>
Mean: {{mean}}, Median {{median}}, Mode {{mode}}
<h3>Distribution of results</h3>
<div id="stats-plot">{{plot|safe}}</div>
<div id="stats-plot"><h3>Distribution of results</h3>{{plot|safe}}</div>
</div>
<div>
<table>
@@ -36,7 +27,7 @@
</tr>
{% for user, value in user_answers_marks.items %}
<tr>
<td>{{user}}</td>
<td><a href="{% url 'cid_scores' user %}">{{user}}</a></td>
<td>{{user_scores|get_item:user}}</td>
</tr>
{% endfor %}
+1 -1
View File
@@ -625,7 +625,7 @@ def exam_scores_cid(request, pk):
mode = "No unique mode"
df = user_scores_list
fig = px.histogram(df, x=0)
fig = px.histogram(df, x=0, title="Distribution of scores", labels={"0": "Score"}, height=400, width=600)
fig_html = fig.to_html()
total = len(questions)