dev_aliyun
p31729568 5 years ago
parent 4ac5ddc655
commit e145fb614f

@ -382,7 +382,7 @@ class CompetitionTeamsController < ApplicationController
.select('sum(compelete_status !=0 ) as finish, count(*) as total')
.having('total != 0 and finish >= (total / 2)').to_sql
Shixun.joins(homework_commons_shixuns: :homework_common)
.where(homework_commons: { homework_type: 3 })
.where(homework_commons: { homework_type: 4 })
.where('course_id in (?)', ids)
.where("exists (#{percentage_sql})")
.group('course_id').count

Loading…
Cancel
Save