exculde low scores from mean
This commit is contained in:
+4
-1
@@ -2129,7 +2129,10 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
mode = 0
|
mode = 0
|
||||||
fig_html = ""
|
fig_html = ""
|
||||||
else:
|
else:
|
||||||
mean = statistics.mean(user_scores_list)
|
#Exclude very low scores from statistics
|
||||||
|
lower_score_bound = max_score / 5
|
||||||
|
|
||||||
|
mean = statistics.mean([i for i in user_scores_list if i > lower_score_bound])
|
||||||
median = statistics.median(user_scores_list)
|
median = statistics.median(user_scores_list)
|
||||||
try:
|
try:
|
||||||
mode = statistics.mode(user_scores_list)
|
mode = statistics.mode(user_scores_list)
|
||||||
|
|||||||
Reference in New Issue
Block a user