修改统计结果错误显示

dev_home
SylorHuang 5 years ago
parent 9286e504a1
commit 1f33b2531e

@ -215,7 +215,7 @@ module ExercisesHelper
# percent = commit_user_ids > 0 ? (all_user_count / commit_user_ids.to_f).round(3)*100 : 0.0
# user_right_count = effictive_users.where("score > 0.0").pluck(:user_id).uniq
# unanswer_user_count = effictive_users.where("score < 0.0 and answer_text is null or answer_text = ''").pluck(:user_id).uniq
user_wrong_count = effictive_users.where("score < 0.0 and (answer_text is null or answer_text = '')").pluck(:user_id).uniq.size
user_wrong_count = effictive_users.where("score < 0.0 and (answer_text is not null or answer_text != '')").pluck(:user_id).uniq.size
# user_wrong_count = (user_wrong_counts - user_right_count - unanswer_user_count).size
if effictive_users_count > 0 && user_wrong_count >= 0

Loading…
Cancel
Save