diff --git a/app/models/poll.rb b/app/models/poll.rb index 1c88c4c5a..e6a363f1d 100644 --- a/app/models/poll.rb +++ b/app/models/poll.rb @@ -45,14 +45,9 @@ class Poll < ApplicationRecord if unified_setting #试卷统一设置 poll_users else -<<<<<<< HEAD - ex_group_setting_ids = poll_group_settings.poll_group_published.select(:course_group_id).pluck(:course_group_id) - poll_users.where(user_id: course.students.where(course_group_id:ex_group_setting_ids).select(:user_id).pluck(:user_id).uniq) -======= ex_group_setting_ids = published_settings.pluck(:course_group_id) poll_users.joins("join course_members on poll_users.user_id=course_members.user_id"). where(course_members: {course_group_id: ex_group_setting_ids}) ->>>>>>> 8bee375b67a224e583b9cfe56507ee1fea7684f8 end end