|
|
|
@ -46,8 +46,8 @@ class Subject < ApplicationRecord
|
|
|
|
|
|
|
|
|
|
# 挑战过路径的成员数(金课统计去重后的报名人数)
|
|
|
|
|
def member_count
|
|
|
|
|
excellent && CourseMember.where(role: 4, course_id: courses.pluck(:id)).pluck(:user_id).uniq.length > shixuns.pluck(:myshixuns_count).sum ?
|
|
|
|
|
CourseMember.where(role: 4, course_id: courses.pluck(:id)).pluck(:user_id).uniq.length : shixuns.pluck(:myshixuns_count).sum
|
|
|
|
|
excellent && CourseMember.where(role: 4, course_id: courses.pluck(:id)).pluck(:user_id).length > shixuns.pluck(:myshixuns_count).sum ?
|
|
|
|
|
CourseMember.where(role: 4, course_id: courses.pluck(:id)).pluck(:user_id).length : shixuns.pluck(:myshixuns_count).sum
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def all_score
|
|
|
|
|