diff --git a/app/controllers/competition_teams_controller.rb b/app/controllers/competition_teams_controller.rb index 933fc4df..18c16f91 100644 --- a/app/controllers/competition_teams_controller.rb +++ b/app/controllers/competition_teams_controller.rb @@ -43,7 +43,7 @@ class CompetitionTeamsController < ApplicationController # 课堂 - student_count_subquery = CourseMember.where('course_id = courses.id AND role = 5').select('count(*)').to_sql + student_count_subquery = CourseMember.where('course_id = courses.id AND role = 4').select('count(*)').to_sql subquery = StudentWork.where('homework_common_id = hcs.id') .select('sum(compelete_status !=0 ) as finish, count(*) as total') .having('total != 0 and finish >= (total / 2)').to_sql