From 79ad96a93f466ecf96ad818c9101deb76e160a37 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Sun, 5 Mar 2023 03:05:42 +0000 Subject: [PATCH] Added additional statistics and improvements to UI --- .../analysis/templates/analysis/analysis.html | 204 ++++++++++-------- 1 file changed, 114 insertions(+), 90 deletions(-) diff --git a/ref-test/app/analysis/templates/analysis/analysis.html b/ref-test/app/analysis/templates/analysis/analysis.html index 627d311..33aad9d 100644 --- a/ref-test/app/analysis/templates/analysis/analysis.html +++ b/ref-test/app/analysis/templates/analysis/analysis.html @@ -8,105 +8,129 @@ {% endblock %} {% block content %} -

Analysis

+

Analysis by {{ type[0]|upper }}{{ type[1:] }}

- Analysis for {{ type }} {{ subject }}. + The analysis section displays statistics for all test results as well as answers to individual questions. + Analysis reports can be generated per exam or per question dataset to identify common mistakes or patterns in answers.

-
-
-

- Question List -

- -
- - - - - - - - - {% for question in questions %} - - - - - - - {% endfor %} - -
- Question - - Percent Correct - - Answers - - Tags -
- {{ question.q_no + 1 }} - - {{ ((analysis.answers[question.q_no][question.correct] or 0)*100/(analysis.answers[question.q_no].values())|sum())|round(2) }} - - - {% for option in question.options %} - - - - - {% endfor %} -
- {{ option[1] }} - - {% if question.correct == option[0] %} -
-
{{ ((analysis.answers[question.q_no][option[0]] or 0)*100/(analysis.answers[question.q_no].values())|sum())|round(2) }}%
-
- {% else %} -
-
{{ ((analysis.answers[question.q_no][option[0]] or 0)*100/(analysis.answers[question.q_no].values())|sum())|round(2) }}%
-
- {% endif %} -
-
-
    - {% for tag in question.tags %} -
  • {{ tag|safe }}
  • - {% endfor %} -
-
-
+ {% endif %} +
+
+ + + + + + + + + {% for question in questions %} + + + + + + + {% endfor %} + +
+ Question + + Percent Correct + + Answers + + Tags +
+ {{ question.q_no + 1 }} + + {{ ((analysis.answers[question.q_no][question.correct] or 0)*100/(analysis.answers[question.q_no].values())|sum())|round(2) }} + + + {% for option in question.options %} + + + + + {% endfor %} +
+ {{ option[1] }} + + {% if question.correct == option[0] %} +
+
{{ ((analysis.answers[question.q_no][option[0]] or 0)*100/(analysis.answers[question.q_no].values())|sum())|round(2) }}%
+
+ {% else %} +
+
{{ ((analysis.answers[question.q_no][option[0]] or 0)*100/(analysis.answers[question.q_no].values())|sum())|round(2) }}%
+
+ {% endif %} +
+
+
    + {% for tag in question.tags %} +
  • {{ tag|safe }}
  • + {% endfor %} +
+
{% endblock %}