Description:
shows more login/contest info on result page
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r304:a6eab16005af - - 2 files changed: 9 inserted, 1 deleted

@@ -120,7 +120,7
120 120
121 121 def user_stat
122 122 @problems = Problem.find_available_problems
123 - @users = User.find(:all)
123 + @users = User.find(:all, :include => [:contests, :contest_stat])
124 124 @scorearray = Array.new
125 125 @users.each do |u|
126 126 ustat = Array.new
@@ -5,6 +5,8
5 5 <th>User</th>
6 6 <th>Name</th>
7 7 <th>Activated?</th>
8 + <th>Logged in</th>
9 + <th>Contest(s)</th>
8 10 <% @problems.each do |p| %>
9 11 <th><%= p.name %></th>
10 12 <% end %>
@@ -21,6 +23,12
21 23 <td><%= sc[i].login %></td>
22 24 <td><%= sc[i].full_name %></td>
23 25 <td><%= sc[i].activated %></td>
26 + <td>
27 + <%= sc[i].try(:contest_stat).try(:started_at)!=nil ? 'yes' : 'no' %>
28 + </td>
29 + <td>
30 + <%= sc[i].contests.collect {|c| c.name}.join(', ') %>
31 + </td>
24 32 <% else %>
25 33 <td><%= sc[i][0] %></td>
26 34 <% total += sc[i][0] %>
You need to be logged in to leave comments. Login now