diff --git a/app/helpers/exercises_helper.rb b/app/helpers/exercises_helper.rb index 24c296558..0cfcd5336 100644 --- a/app/helpers/exercises_helper.rb +++ b/app/helpers/exercises_helper.rb @@ -117,7 +117,7 @@ module ExercisesHelper #计算每个问题的答案人数 commit_users.transaction do commit_users.each do |user| - answer_choice_array = effictive_users.select(:user_id).where(user_id:user.user_id)&.map {|s| s.exercise_choice.choice_position}.uniq + answer_choice_array = effictive_users.select(:user_id,:exercise_choice_id).where(user_id:user.user_id)&.map {|s| s.exercise_choice.choice_position}.uniq if answer_choice_array.sort == standard_answer right_users_count += 1 end