Skip to content

Commit

Permalink
Fixed the stats calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanbaidan committed Mar 26, 2024
1 parent ba87267 commit 1a070dc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions stats/stats_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,16 @@ def get_finished_surveys_list(start_date, end_date):
"score"
] += round(answer_score * 100 / max_evaluations_per_section[section_id])

surveys_users_results["survey_users"][user_id]["details"][
"total_score"
] = round(total_points_number * 100 / total_questions_score)
total_overall_score += surveys_users_results["survey_users"][user_id][
"details"
]["total_score"]
surveys_users_results["survey_users"][user_id]["details"][
"total_score"
] = round(total_points_number * 100 / total_questions_score)
total_overall_score += surveys_users_results["survey_users"][user_id][
"details"
]["total_score"]

return {
"start_date": str(start_date),
"end_date": str(end_date),
"total_overall_score": total_overall_score,
"total_average_score": round(
total_overall_score / surveys_users_results["surveys_total_number"]
),
Expand Down

0 comments on commit 1a070dc

Please sign in to comment.