Description:
add footer for total score
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r698:4e69c0114af7 - - 1 file changed: 35 inserted, 0 deleted
@@ -12,6 +12,9 | |||
|
12 | 12 | %th.text-right Total |
|
13 | 13 | %th.text-right Passed |
|
14 | 14 | %tbody |
|
15 | + - sum = Array.new(@scorearray[0].count,0) | |
|
16 | + - nonzero = Array.new(@scorearray[0].count,0) | |
|
17 | + - full = Array.new(@scorearray[0].count,0) | |
|
15 | 18 | - @scorearray.each do |sc| |
|
16 | 19 | %tr |
|
17 | 20 | - total,num_passed = 0,0 |
@@ -27,8 +30,40 | |||
|
27 | 30 | %td.text-right= sc[i][0] |
|
28 | 31 | - total += sc[i][0] |
|
29 | 32 | - num_passed += 1 if sc[i][1] |
|
33 | + - sum[i] += sc[i][0] | |
|
34 | + - nonzero[i] += 1 if sc[i][0] > 0 | |
|
35 | + - full[i] += 1 if sc[i][1] | |
|
30 | 36 | %td.text-right= total |
|
31 | 37 | %td.text-right= num_passed |
|
38 | + %tfoot | |
|
39 | + %tr | |
|
40 | + %td Summation | |
|
41 | + %td | |
|
42 | + %td | |
|
43 | + - sum.each.with_index do |s,i| | |
|
44 | + - next if i == 0 | |
|
45 | + %td.text-right= number_with_delimiter(s) | |
|
46 | + %td | |
|
47 | + %td | |
|
48 | + %tr | |
|
49 | + %td partial solver | |
|
50 | + %td | |
|
51 | + %td | |
|
52 | + - nonzero.each.with_index do |s,i| | |
|
53 | + - next if i == 0 | |
|
54 | + %td.text-right= number_with_delimiter(s) | |
|
55 | + %td | |
|
56 | + %td | |
|
57 | + %tr | |
|
58 | + %td Full solver | |
|
59 | + %td | |
|
60 | + %td | |
|
61 | + - full.each.with_index do |s,i| | |
|
62 | + - next if i == 0 | |
|
63 | + %td.text-right= number_with_delimiter(s) | |
|
64 | + %td | |
|
65 | + %td | |
|
66 | + | |
|
32 | 67 | |
|
33 | 68 | :javascript |
|
34 | 69 | $.bootstrapSortable(true,'reversed') |
You need to be logged in to leave comments.
Login now