diff --git a/app/controllers/competitions_controller.rb b/app/controllers/competitions_controller.rb index 43181d8c..57ff871c 100644 --- a/app/controllers/competitions_controller.rb +++ b/app/controllers/competitions_controller.rb @@ -782,7 +782,7 @@ class CompetitionsController < ApplicationController challenges.each do |challenge| Game.where(:challenge_id => challenge.id, :user_id => user_ids, :status => 2).select{|game| game.open_time >= s_time && game.end_time <= e_time }.each do |game| - outputs = game.outputs.select{|output| !output.text_scor.nil? } + outputs = game.outputs.select{|output| !output.text_scor.nil? && output.created_at <= e_time } if outputs.present? outputs = outputs.sort { |a, b| b[:text_scor].to_f <=> a[:text_scor].to_f } myshixun_score = outputs.first.text_scor.to_f