From 6962263070dfe73bc8f1d23342c1a3bee2a46971 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 20 Jul 2023 15:27:58 +0100 Subject: [PATCH] add more downloads to help with scoring checks section maxes and weighted maxes question maxes and options --- ceuk-marking/urls.py | 10 + crowdsourcer/scoring.py | 3 + crowdsourcer/templates/crowdsourcer/base.html | 6 + crowdsourcer/views/stats.py | 180 ++++++++++++++++-- 4 files changed, 185 insertions(+), 14 deletions(-) diff --git a/ceuk-marking/urls.py b/ceuk-marking/urls.py index ae15ec78..782ec39d 100644 --- a/ceuk-marking/urls.py +++ b/ceuk-marking/urls.py @@ -183,11 +183,21 @@ stats.QuestionDataCSVView.as_view(), name="question_data_csv", ), + path( + "stats/scores/question_scores/", + stats.QuestionScoresCSV.as_view(), + name="question_scores_csv", + ), path( "stats/scores/weighted_totals/", stats.WeightedScoresDataCSVView.as_view(), name="weighted_totals_csv", ), + path( + "stats/scores/raw_and_weighted_totals/", + stats.SectionScoresDataCSVView.as_view(), + name="raw_and_weighted_totals_csv", + ), path( "stats/scores/bad_responses/", stats.BadResponsesView.as_view(), diff --git a/crowdsourcer/scoring.py b/crowdsourcer/scoring.py index 0b24b264..86e7739d 100644 --- a/crowdsourcer/scoring.py +++ b/crowdsourcer/scoring.py @@ -266,6 +266,9 @@ def calculate_council_totals( section_totals[council][section] = { "raw": score, "raw_percent": percentage_score, + "raw_weighted": weighted_scores[council][section], + "unweighted_percentage": weighted_scores[council][section] + / weighted_maxes[section][council_group], "weighted": weighted_score, } diff --git a/crowdsourcer/templates/crowdsourcer/base.html b/crowdsourcer/templates/crowdsourcer/base.html index 50113ed7..807d9be1 100644 --- a/crowdsourcer/templates/crowdsourcer/base.html +++ b/crowdsourcer/templates/crowdsourcer/base.html @@ -89,9 +89,15 @@
  • Responses with no answer
  • +
  • + Raw and weighted scores and totals (CSV) +
  • Weighted section totals (CSV)
  • +
  • + Question scores and answers (CSV) +