@ -72,7 +72,7 @@ class Exercise < ApplicationRecord
# 有分班权限的统计管理的分班且已发布的学生情况
if teacher_course_groups.exists?
group_ids = teacher_course_groups.pluck(:course_group_id)
ex_users = ex_users.joins("join course_members on student_works.user_id=course_members.user_id").
ex_users = ex_users.joins("join course_members on exercise_users.user_id=course_members.user_id").
where(course_members: {course_group_id: group_ids})
end
ex_users