Description:
report only enabled user
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r550:6d57d5eff450 - - 1 file changed: 1 inserted, 1 deleted

@@ -139,13 +139,13
139 def user_stat
139 def user_stat
140 if params[:commit] == 'download csv'
140 if params[:commit] == 'download csv'
141 @problems = Problem.all
141 @problems = Problem.all
142 else
142 else
143 @problems = Problem.find_available_problems
143 @problems = Problem.find_available_problems
144 end
144 end
145 - @users = User.find(:all, :include => [:contests, :contest_stat])
145 + @users = User.includes(:contests, :contest_stat).where(enabled: true) #find(:all, :include => [:contests, :contest_stat]).where(enabled: true)
146 @scorearray = Array.new
146 @scorearray = Array.new
147 @users.each do |u|
147 @users.each do |u|
148 ustat = Array.new
148 ustat = Array.new
149 ustat[0] = u
149 ustat[0] = u
150 @problems.each do |p|
150 @problems.each do |p|
151 sub = Submission.find_last_by_user_and_problem(u.id,p.id)
151 sub = Submission.find_last_by_user_and_problem(u.id,p.id)
You need to be logged in to leave comments. Login now