|
|
@ -59,7 +59,7 @@ class Exercise < ApplicationRecord
|
|
|
|
|
|
|
|
|
|
|
|
# 根据是否统一发布获取作业的作品列表
|
|
|
|
# 根据是否统一发布获取作业的作品列表
|
|
|
|
def all_works
|
|
|
|
def all_works
|
|
|
|
exercise_users = unified_setting ? exercise_users :
|
|
|
|
ex_users = unified_setting ? exercise_users :
|
|
|
|
exercise_users.joins("join course_members on exercise_users.user_id=course_members.user_id").
|
|
|
|
exercise_users.joins("join course_members on exercise_users.user_id=course_members.user_id").
|
|
|
|
where(course_members: {course_group_id: published_settings.pluck(:course_group_id)})
|
|
|
|
where(course_members: {course_group_id: published_settings.pluck(:course_group_id)})
|
|
|
|
end
|
|
|
|
end
|
|
|
|