From cf4668e3b8e6e016a8b9ae445c3716e11213d36e Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 21 Oct 2019 18:01:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E6=88=98=E9=98=9F=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/competition_teams_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/competition_teams_controller.rb b/app/controllers/competition_teams_controller.rb index 9c39cf44..c3a44fd8 100644 --- a/app/controllers/competition_teams_controller.rb +++ b/app/controllers/competition_teams_controller.rb @@ -59,6 +59,8 @@ class CompetitionTeamsController < ApplicationController return render_404 if @competition.identifier != 'gcc-course-2019' @competition_completed = false + @team_user_ids = @team.team_members.pluck(:user_id) + # 竞赛结束并且分数已经统计 if @competition.end_time < Time.current && CompetitionCourseRecord.exists?(competition_id: @competition.id) @competition_completed = true @@ -66,8 +68,6 @@ class CompetitionTeamsController < ApplicationController return end - @team_user_ids = @team.team_members.pluck(:user_id) - 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')