add sortable candidade score tables

This commit is contained in:
Ross
2024-01-08 14:16:23 +00:00
parent f839ca4ed5
commit 05e551d8e7
4 changed files with 502 additions and 6 deletions
+2 -3
View File
@@ -2133,9 +2133,8 @@ class ExamViews(View, LoginRequiredMixin):
lower_score_bound = max_score / 5
bounded_scores = [i for i in user_scores_list if i > lower_score_bound]
if bounded_scores:
mean = statistics.mean(bounded_scores)
else:
mean = statistics.mean(user_scores_list)
user_Scores_list = bounded_scores
mean = statistics.mean(user_scores_list)
median = statistics.median(user_scores_list)
try:
mode = statistics.mode(user_scores_list)