Description:
Added an option to change to Analysis Mode
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r369:68fae0d56cdb - - 2 files changed: 11 inserted, 8 deleted
@@ -34,13 +34,13 | |||
|
34 | 34 | UserContestStat.delete_all() |
|
35 | 35 | flash[:notice] = 'All start time statistic cleared.' |
|
36 | 36 | redirect_to :action => 'index' |
|
37 | 37 | end |
|
38 | 38 | |
|
39 | 39 | def change_contest_mode |
|
40 | - if ['standard', 'contest', 'indv-contest'].include? params[:id] | |
|
40 | + if ['standard', 'contest', 'indv-contest', 'analysis'].include? params[:id] | |
|
41 | 41 | config = GraderConfiguration.find_by_key('system.mode') |
|
42 | 42 | config.value = params[:id] |
|
43 | 43 | config.save |
|
44 | 44 | else |
|
45 | 45 | flash[:notice] = 'Wrong contest mode value' |
|
46 | 46 | end |
@@ -8,24 +8,27 | |||
|
8 | 8 | - else |
|
9 | 9 | %b Single contest: |
|
10 | 10 | =raw "[#{link_to 'Add/remove contests', :controller => 'contests', :action => 'index'}]" |
|
11 | 11 | |
|
12 | 12 | .infobox |
|
13 | 13 | %b Web interface mode: |
|
14 | - - if (not GraderConfiguration.contest_mode?) and (not GraderConfiguration.indv_contest_mode?) | |
|
15 | - standard mode | |
|
14 | + - if GraderConfiguration.analysis_mode? | |
|
15 | + Analysis Mode | |
|
16 | + - elsif (not GraderConfiguration.contest_mode?) and (not GraderConfiguration.indv_contest_mode?) | |
|
17 | + Standard Mode | |
|
16 | 18 | - elsif GraderConfiguration.contest_mode? |
|
17 |
- |
|
|
19 | + Normal Contest Mode | |
|
18 | 20 | - else |
|
19 |
- |
|
|
21 | + Individual Contest Mode | |
|
20 | 22 | |
|
21 | 23 | %br/ |
|
22 | 24 | Change mode to: |
|
23 |
- =raw "[#{link_to ' |
|
|
24 |
- =raw "[#{link_to ' |
|
|
25 |
- =raw "[#{link_to ' |
|
|
25 | + =raw "[#{link_to 'Standard', :action => 'change_contest_mode', :id => 'standard'}]" | |
|
26 | + =raw "[#{link_to 'Contest', :action => 'change_contest_mode', :id => 'contest'}]" | |
|
27 | + =raw "[#{link_to 'Individual Contest', :action => 'change_contest_mode', :id => 'indv-contest'}]" | |
|
28 | + =raw "[#{link_to 'Analysis', :action => 'change_contest_mode', :id => 'analysis'}]" | |
|
26 | 29 | |
|
27 | 30 | - if GraderConfiguration.indv_contest_mode? |
|
28 | 31 | = render :partial => 'indv_contest_mode_index' |
|
29 | 32 | |
|
30 | 33 | %br/ |
|
31 | 34 |
You need to be logged in to leave comments.
Login now