Description:
add section information
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r510:89d1f8d661ec - - 1 file changed: 2 inserted, 0 deleted
@@ -1,54 +1,56 | |||||
|
1 | - content_for :header do |
|
1 | - content_for :header do |
|
2 | = javascript_include_tag 'new' |
|
2 | = javascript_include_tag 'new' |
|
3 | = stylesheet_link_tag 'tablesorter-theme.cafe' |
|
3 | = stylesheet_link_tag 'tablesorter-theme.cafe' |
|
4 |
|
4 | ||
|
5 | %script{:type=>"text/javascript"} |
|
5 | %script{:type=>"text/javascript"} |
|
6 | $(function () { |
|
6 | $(function () { |
|
7 | $('#since_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); |
|
7 | $('#since_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); |
|
8 | $('#until_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); |
|
8 | $('#until_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); |
|
9 | $('#my_table').tablesorter({widgets: ['zebra']}); |
|
9 | $('#my_table').tablesorter({widgets: ['zebra']}); |
|
10 | }); |
|
10 | }); |
|
11 |
|
11 | ||
|
12 | %h1 User grading results |
|
12 | %h1 User grading results |
|
13 | %h2= params[:action] == 'user_stat' ? "Show scores from latest submission" : "Show max scores in submission range" |
|
13 | %h2= params[:action] == 'user_stat' ? "Show scores from latest submission" : "Show max scores in submission range" |
|
14 |
|
14 | ||
|
15 |
|
15 | ||
|
16 | - if @problem and @problem.errors |
|
16 | - if @problem and @problem.errors |
|
17 | =error_messages_for 'problem' |
|
17 | =error_messages_for 'problem' |
|
18 |
|
18 | ||
|
19 | = render partial: 'submission_range' |
|
19 | = render partial: 'submission_range' |
|
20 |
|
20 | ||
|
21 | - if params[:action] == 'user_stat' |
|
21 | - if params[:action] == 'user_stat' |
|
22 | = "latest score" |
|
22 | = "latest score" |
|
23 | - else |
|
23 | - else |
|
24 | = link_to '[Show only latest submissions]', controller: :user_admin, action: :user_stat |
|
24 | = link_to '[Show only latest submissions]', controller: :user_admin, action: :user_stat |
|
25 |
|
25 | ||
|
26 | %table.tablesorter-cafe#my_table |
|
26 | %table.tablesorter-cafe#my_table |
|
27 | %thead |
|
27 | %thead |
|
28 | %tr |
|
28 | %tr |
|
29 | %th User |
|
29 | %th User |
|
30 | %th Name |
|
30 | %th Name |
|
31 | %th Activated? |
|
31 | %th Activated? |
|
32 | %th Logged in |
|
32 | %th Logged in |
|
33 | %th Contest(s) |
|
33 | %th Contest(s) |
|
|
34 | + %th Section | ||
|
34 | - @problems.each do |p| |
|
35 | - @problems.each do |p| |
|
35 | %th= p.name |
|
36 | %th= p.name |
|
36 | %th Total |
|
37 | %th Total |
|
37 | %th Passed |
|
38 | %th Passed |
|
38 | %tbody |
|
39 | %tbody |
|
39 | - @scorearray.each do |sc| |
|
40 | - @scorearray.each do |sc| |
|
40 | %tr{class: cycle('info-even','info-odd')} |
|
41 | %tr{class: cycle('info-even','info-odd')} |
|
41 | - total,num_passed = 0,0 |
|
42 | - total,num_passed = 0,0 |
|
42 | - sc.each_index do |i| |
|
43 | - sc.each_index do |i| |
|
43 | - if i == 0 |
|
44 | - if i == 0 |
|
44 | %td= link_to sc[i].login, controller: 'users', action: 'profile', id: sc[i] |
|
45 | %td= link_to sc[i].login, controller: 'users', action: 'profile', id: sc[i] |
|
45 | %td= sc[i].full_name |
|
46 | %td= sc[i].full_name |
|
46 | %td= sc[i].activated |
|
47 | %td= sc[i].activated |
|
47 | %td= sc[i].try(:contest_stat).try(:started_at)!=nil ? 'yes' : 'no' |
|
48 | %td= sc[i].try(:contest_stat).try(:started_at)!=nil ? 'yes' : 'no' |
|
48 | %td= sc[i].contests.collect {|c| c.name}.join(', ') |
|
49 | %td= sc[i].contests.collect {|c| c.name}.join(', ') |
|
|
50 | + %td= sc[i].section | ||
|
49 | - else |
|
51 | - else |
|
50 | %td= sc[i][0] |
|
52 | %td= sc[i][0] |
|
51 | - total += sc[i][0] |
|
53 | - total += sc[i][0] |
|
52 | - num_passed += 1 if sc[i][1] |
|
54 | - num_passed += 1 if sc[i][1] |
|
53 | %td= total |
|
55 | %td= total |
|
54 | %td= num_passed |
|
56 | %td= num_passed |
You need to be logged in to leave comments.
Login now