dev_home
SylorHuang 6 years ago
parent a81d7e6609
commit 9af4d4144e

@ -214,7 +214,7 @@ module ExercisesHelper
# percent = commit_user_ids > 0 ? (all_user_count / commit_user_ids.to_f).round(3)*100 : 0.0 # percent = commit_user_ids > 0 ? (all_user_count / commit_user_ids.to_f).round(3)*100 : 0.0
user_wrong_count = effictive_users.where("score < 0").size user_wrong_count = effictive_users.where("score < 0").pluck(:user_id).uniq.size
if effictive_users_count > 0 && user_wrong_count >= 0 if effictive_users_count > 0 && user_wrong_count >= 0
wrong_percent = (user_wrong_count / effictive_users_count.to_f ).round(3) wrong_percent = (user_wrong_count / effictive_users_count.to_f ).round(3)

Loading…
Cancel
Save