dev_course
cxt 5 years ago
parent 17b8f21a2a
commit e4624252c8

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

Loading…
Cancel
Save