|
|
|
@ -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')
|
|
|
|
|