|
|
@ -117,7 +117,7 @@ module ExercisesHelper
|
|
|
|
#计算每个问题的答案人数
|
|
|
|
#计算每个问题的答案人数
|
|
|
|
commit_users.transaction do
|
|
|
|
commit_users.transaction do
|
|
|
|
commit_users.each do |user|
|
|
|
|
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
|
|
|
|
if answer_choice_array.sort == standard_answer
|
|
|
|
right_users_count += 1
|
|
|
|
right_users_count += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|