Show More
Commit Description:
shows more login/contest info on result page
Commit Description:
shows more login/contest info on result page
References:
File last commit:
Show/Diff file:
Action:
app/views/user_admin/user_stat.rhtml
| 43 lines
| 1.0 KiB
| text/html+ruby
| RhtmlLexer
|
|
r57 | <h1>User grading results</h1> | ||
|
r0 | |||
|
r57 | <table class="info"> | ||
|
r162 | <tr class="info-head"> | ||
<th>User</th> | ||||
<th>Name</th> | ||||
<th>Activated?</th> | ||||
|
r304 | <th>Logged in</th> | ||
<th>Contest(s)</th> | ||||
|
r0 | <% @problems.each do |p| %> | ||
|
r57 | <th><%= p.name %></th> | ||
|
r0 | <% end %> | ||
|
r57 | <th>Total</th> | ||
<th>Passed</th> | ||||
|
r0 | </tr> | ||
|
r57 | <% counter = 0 %> | ||
|
r0 | <% @scorearray.each do |sc| %> | ||
|
r57 | <tr class="<%= (counter %2 ==0) ? "info-even" : "info-odd" %>"> | ||
|
r0 | <% total = 0 %> | ||
|
r8 | <% num_passed = 0 %> | ||
<% sc.each_index do |i| %> | ||||
|
r162 | <% if i==0 %> | ||
<td><%= sc[i].login %></td> | ||||
<td><%= sc[i].full_name %></td> | ||||
<td><%= sc[i].activated %></td> | ||||
|
r304 | <td> | ||
<%= sc[i].try(:contest_stat).try(:started_at)!=nil ? 'yes' : 'no' %> | ||||
</td> | ||||
<td> | ||||
<%= sc[i].contests.collect {|c| c.name}.join(', ') %> | ||||
</td> | ||||
|
r8 | <% else %> | ||
<td><%= sc[i][0] %></td> | ||||
<% total += sc[i][0] %> | ||||
<% num_passed += 1 if sc[i][1] %> | ||||
<% end %> | ||||
|
r0 | <% end %> | ||
<td><%= total %></td> | ||||
|
r8 | <td><%= num_passed %></td> | ||
|
r0 | </tr> | ||
|
r57 | <% counter += 1 %> | ||
|
r0 | <% end %> | ||
</table> | ||||