Description:
shows scores only for submitted problems
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r386:aef66acd0ee0 - - 2 files changed: 5 inserted, 1 deleted

@@ -130,13 +130,13
130 130 ustat[0] = u
131 131 @problems.each do |p|
132 132 sub = Submission.find_last_by_user_and_problem(u.id,p.id)
133 133 if (sub!=nil) and (sub.points!=nil)
134 134 ustat << [(sub.points.to_f*100/p.full_score).round, (sub.points>=p.full_score)]
135 135 else
136 - ustat << [0,false]
136 + ustat << [nil,false]
137 137 end
138 138 end
139 139 @scorearray << ustat
140 140 end
141 141 end
142 142
@@ -32,15 +32,19
32 32 <%= sc[i].try(:contest_stat).try(:started_at)!=nil ? 'yes' : 'no' %>
33 33 </td>
34 34 <td>
35 35 <%= sc[i].contests.collect {|c| c.name}.join(', ') %>
36 36 </td>
37 37 <% else %>
38 + <% if sc[i][0] != nil %>
38 39 <td><%= sc[i][0] %></td>
39 40 <% total += sc[i][0] %>
40 41 <% num_passed += 1 if sc[i][1] %>
42 + <% else %>
43 + <td>-</td>
44 + <% end %>
41 45 <% end %>
42 46 <% end %>
43 47 <td><%= total %></td>
44 48 <td><%= num_passed %></td>
45 49 </tr>
46 50 <% counter += 1 %>
You need to be logged in to leave comments. Login now