Description:
- streamline current score report and fix some bug
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r610:0c5b815f0163 - - 3 files changed: 12 inserted, 9 deleted
@@ -521,7 +521,7 | |||||
|
521 | row << sc[i].login |
|
521 | row << sc[i].login |
|
522 | row << sc[i].full_name |
|
522 | row << sc[i].full_name |
|
523 | row << sc[i].activated |
|
523 | row << sc[i].activated |
|
524 | - row << (sc[i].try(:contest_stat).try(:started_at).nil? 'no' : 'yes') |
|
524 | + row << (sc[i].try(:contest_stat).try(:started_at).nil? ? 'no' : 'yes') |
|
525 | row << sc[i].contests.collect {|c| c.name}.join(', ') |
|
525 | row << sc[i].contests.collect {|c| c.name}.join(', ') |
|
526 | else |
|
526 | else |
|
527 | row << sc[i][0] |
|
527 | row << sc[i][0] |
@@ -32,6 +32,7 | |||||
|
32 | $("#countdown").countdown({until: "+#{@current_user.contest_time_left.to_i}s", layout: 'Time left: {hnn}:{mnn}:{snn}'}); |
|
32 | $("#countdown").countdown({until: "+#{@current_user.contest_time_left.to_i}s", layout: 'Time left: {hnn}:{mnn}:{snn}'}); |
|
33 | / admin section |
|
33 | / admin section |
|
34 | - if (@current_user!=nil) and (session[:admin]) |
|
34 | - if (@current_user!=nil) and (session[:admin]) |
|
|
35 | + / management | ||
|
35 | %li.dropdown |
|
36 | %li.dropdown |
|
36 | %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"} |
|
37 | %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"} |
|
37 | Manage |
|
38 | Manage |
@@ -47,12 +48,14 | |||||
|
47 | %li.divider{role: 'separator'} |
|
48 | %li.divider{role: 'separator'} |
|
48 | = add_menu( 'Sites', 'sites', 'index') |
|
49 | = add_menu( 'Sites', 'sites', 'index') |
|
49 | = add_menu( 'Contests', 'contest_management', 'index') |
|
50 | = add_menu( 'Contests', 'contest_management', 'index') |
|
|
51 | + / report | ||
|
50 | %li.dropdown |
|
52 | %li.dropdown |
|
51 | %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"} |
|
53 | %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"} |
|
52 | Report |
|
54 | Report |
|
53 | %span.caret |
|
55 | %span.caret |
|
54 | %ul.dropdown-menu |
|
56 | %ul.dropdown-menu |
|
55 |
- = add_menu( ' |
|
57 | + = add_menu( 'Current Score', 'report', 'current_score') |
|
|
58 | + = add_menu( 'Score Report', 'report', 'max_score') | ||
|
56 | = add_menu( 'Report', 'report', 'multiple_login') |
|
59 | = add_menu( 'Report', 'report', 'multiple_login') |
|
57 | - if (ungraded = Submission.where('graded_at is null').where('submitted_at < ?', 1.minutes.ago).count) > 0 |
|
60 | - if (ungraded = Submission.where('graded_at is null').where('submitted_at < ?', 1.minutes.ago).count) > 0 |
|
58 | =link_to "#{ungraded} backlogs!", |
|
61 | =link_to "#{ungraded} backlogs!", |
@@ -3,12 +3,12 | |||||
|
3 | %tr |
|
3 | %tr |
|
4 | %th Login |
|
4 | %th Login |
|
5 | %th Name |
|
5 | %th Name |
|
6 | - %th Activated? |
|
6 | + / %th Activated? |
|
7 | - %th Logged_in |
|
7 | + / %th Logged_in |
|
8 | - %th Contest(s) |
|
8 | + / %th Contest(s) |
|
9 | %th Remark |
|
9 | %th Remark |
|
10 | - @problems.each do |p| |
|
10 | - @problems.each do |p| |
|
11 | - %th.text-right= p.name |
|
11 | + %th.text-right= p.name.gsub('_',' ') |
|
12 | %th.text-right Total |
|
12 | %th.text-right Total |
|
13 | %th.text-right Passed |
|
13 | %th.text-right Passed |
|
14 | %tbody |
|
14 | %tbody |
@@ -19,9 +19,9 | |||||
|
19 | - if i == 0 |
|
19 | - if i == 0 |
|
20 | %td= link_to sc[i].login, controller: 'users', action: 'profile', id: sc[i] |
|
20 | %td= link_to sc[i].login, controller: 'users', action: 'profile', id: sc[i] |
|
21 | %td= sc[i].full_name |
|
21 | %td= sc[i].full_name |
|
22 | - %td= sc[i].activated |
|
22 | + / %td= sc[i].activated |
|
23 | - %td= sc[i].try(:contest_stat).try(:started_at) ? 'yes' : 'no' |
|
23 | + / %td= sc[i].try(:contest_stat).try(:started_at) ? 'yes' : 'no' |
|
24 | - %td= sc[i].contests.collect {|c| c.name}.join(', ') |
|
24 | + / %td= sc[i].contests.collect {|c| c.name}.join(', ') |
|
25 | %td= sc[i].remark |
|
25 | %td= sc[i].remark |
|
26 | - else |
|
26 | - else |
|
27 | %td.text-right= sc[i][0] |
|
27 | %td.text-right= sc[i][0] |
You need to be logged in to leave comments.
Login now