Description:
merge
Commit status:
[Not Reviewed]
References:
merge algo
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r767:aac82fe8b800 - - 1 file changed: 6 inserted, 0 deleted

@@ -1,199 +1,205
1 Rails.application.routes.draw do
1 Rails.application.routes.draw do
2 resources :tags
2 resources :tags
3 get "sources/direct_edit"
3 get "sources/direct_edit"
4
4
5 root :to => 'main#login'
5 root :to => 'main#login'
6
6
7 #logins
7 #logins
8 match 'login/login', to: 'login#login', via: [:get,:post]
8 match 'login/login', to: 'login#login', via: [:get,:post]
9
9
10 resources :contests
10 resources :contests
11 resources :sites
11 resources :sites
12 resources :test
12 resources :test
13
13
14 resources :messages do
14 resources :messages do
15 member do
15 member do
16 get 'hide'
16 get 'hide'
17 post 'reply'
17 post 'reply'
18 end
18 end
19 collection do
19 collection do
20 get 'console'
20 get 'console'
21 get 'list_all'
21 get 'list_all'
22 end
22 end
23 end
23 end
24
24
25 resources :announcements do
25 resources :announcements do
26 member do
26 member do
27 get 'toggle','toggle_front'
27 get 'toggle','toggle_front'
28 end
28 end
29 end
29 end
30
30
31 resources :problems do
31 resources :problems do
32 member do
32 member do
33 get 'toggle'
33 get 'toggle'
34 get 'toggle_test'
34 get 'toggle_test'
35 get 'toggle_view_testcase'
35 get 'toggle_view_testcase'
36 get 'stat'
36 get 'stat'
37 end
37 end
38 collection do
38 collection do
39 get 'turn_all_off'
39 get 'turn_all_off'
40 get 'turn_all_on'
40 get 'turn_all_on'
41 get 'import'
41 get 'import'
42 get 'manage'
42 get 'manage'
43 get 'quick_create'
43 get 'quick_create'
44 post 'do_manage'
44 post 'do_manage'
45 post 'do_import'
45 post 'do_import'
46 end
46 end
47 end
47 end
48
48
49 resources :groups do
49 resources :groups do
50 member do
50 member do
51 post 'add_user', to: 'groups#add_user', as: 'add_user'
51 post 'add_user', to: 'groups#add_user', as: 'add_user'
52 delete 'remove_user/:user_id', to: 'groups#remove_user', as: 'remove_user'
52 delete 'remove_user/:user_id', to: 'groups#remove_user', as: 'remove_user'
53 delete 'remove_all_user', to: 'groups#remove_all_user', as: 'remove_all_user'
53 delete 'remove_all_user', to: 'groups#remove_all_user', as: 'remove_all_user'
54 post 'add_problem', to: 'groups#add_problem', as: 'add_problem'
54 post 'add_problem', to: 'groups#add_problem', as: 'add_problem'
55 delete 'remove_problem/:problem_id', to: 'groups#remove_problem', as: 'remove_problem'
55 delete 'remove_problem/:problem_id', to: 'groups#remove_problem', as: 'remove_problem'
56 delete 'remove_all_problem', to: 'groups#remove_all_problem', as: 'remove_all_problem'
56 delete 'remove_all_problem', to: 'groups#remove_all_problem', as: 'remove_all_problem'
57 end
57 end
58 collection do
58 collection do
59
59
60 end
60 end
61 end
61 end
62
62
63 resources :testcases, only: [] do
63 resources :testcases, only: [] do
64 member do
64 member do
65 get 'download_input'
65 get 'download_input'
66 get 'download_sol'
66 get 'download_sol'
67 end
67 end
68 collection do
68 collection do
69 get 'show_problem/:problem_id(/:test_num)' => 'testcases#show_problem', as: 'show_problem'
69 get 'show_problem/:problem_id(/:test_num)' => 'testcases#show_problem', as: 'show_problem'
70 end
70 end
71 end
71 end
72
72
73 resources :grader_configuration, controller: 'configurations' do
73 resources :grader_configuration, controller: 'configurations' do
74 collection do
74 collection do
75 get 'set_exam_right(/:value)', action: 'set_exam_right', as: 'set_exam_right'
75 get 'set_exam_right(/:value)', action: 'set_exam_right', as: 'set_exam_right'
76 end
76 end
77 end
77 end
78
78
79 resources :users do
79 resources :users do
80 member do
80 member do
81 get 'toggle_activate', 'toggle_enable'
81 get 'toggle_activate', 'toggle_enable'
82 get 'stat'
82 get 'stat'
83 end
83 end
84 collection do
84 collection do
85 get 'profile'
85 get 'profile'
86 post 'chg_passwd'
86 post 'chg_passwd'
87 end
87 end
88 end
88 end
89
89
90 resources :submissions do
90 resources :submissions do
91 member do
91 member do
92 get 'download'
92 get 'download'
93 get 'compiler_msg'
93 get 'compiler_msg'
94 get 'rejudge'
94 get 'rejudge'
95 get 'source'
95 get 'source'
96 end
96 end
97 collection do
97 collection do
98 get 'prob/:problem_id', to: 'submissions#index', as: 'problem'
98 get 'prob/:problem_id', to: 'submissions#index', as: 'problem'
99 get 'direct_edit_problem/:problem_id(/:user_id)', to: 'submissions#direct_edit_problem', as: 'direct_edit_problem'
99 get 'direct_edit_problem/:problem_id(/:user_id)', to: 'submissions#direct_edit_problem', as: 'direct_edit_problem'
100 get 'get_latest_submission_status/:uid/:pid', to: 'submissions#get_latest_submission_status', as: 'get_latest_submission_status'
100 get 'get_latest_submission_status/:uid/:pid', to: 'submissions#get_latest_submission_status', as: 'get_latest_submission_status'
101 end
101 end
102 end
102 end
103
103
104
104
105 #user admin
105 #user admin
106 resources :user_admin do
106 resources :user_admin do
107 collection do
107 collection do
108 match 'bulk_manage', via: [:get, :post]
108 match 'bulk_manage', via: [:get, :post]
109 get 'bulk_mail'
109 get 'bulk_mail'
110 get 'user_stat'
110 get 'user_stat'
111 get 'import'
111 get 'import'
112 get 'new_list'
112 get 'new_list'
113 get 'admin'
113 get 'admin'
114 get 'active'
114 get 'active'
115 get 'mass_mailing'
115 get 'mass_mailing'
116 get 'revoke_admin'
116 get 'revoke_admin'
117 post 'grant_admin'
117 post 'grant_admin'
118 match 'create_from_list', via: [:get, :post]
118 match 'create_from_list', via: [:get, :post]
119 match 'random_all_passwords', via: [:get, :post]
119 match 'random_all_passwords', via: [:get, :post]
120 end
120 end
121 member do
121 member do
122 get 'clear_last_ip'
122 get 'clear_last_ip'
123 end
123 end
124 end
124 end
125
125
126 resources :contest_management, only: [:index] do
126 resources :contest_management, only: [:index] do
127 collection do
127 collection do
128 get 'user_stat'
128 get 'user_stat'
129 get 'clear_stat'
129 get 'clear_stat'
130 get 'clear_all_stat'
130 get 'clear_all_stat'
131 get 'change_contest_mode'
131 get 'change_contest_mode'
132 end
132 end
133 end
133 end
134
134
135 #get 'user_admin', to: 'user_admin#index'
135 #get 'user_admin', to: 'user_admin#index'
136 #get 'user_admin/bulk_manage', to: 'user_admin#bulk_manage', as: 'bulk_manage_user_admin'
136 #get 'user_admin/bulk_manage', to: 'user_admin#bulk_manage', as: 'bulk_manage_user_admin'
137 #post 'user_admin', to: 'user_admin#create'
137 #post 'user_admin', to: 'user_admin#create'
138 #delete 'user_admin/:id', to: 'user_admin#destroy', as: 'user_admin_destroy'
138 #delete 'user_admin/:id', to: 'user_admin#destroy', as: 'user_admin_destroy'
139
139
140 #singular resource
140 #singular resource
141 #---- BEWARE ---- singular resource maps to plural controller by default, we can override by provide controller name directly
141 #---- BEWARE ---- singular resource maps to plural controller by default, we can override by provide controller name directly
142 #report
142 #report
143 resource :report, only: [], controller: 'report' do
143 resource :report, only: [], controller: 'report' do
144 get 'login'
144 get 'login'
145 get 'multiple_login'
145 get 'multiple_login'
146 get 'problem_hof(/:id)', action: 'problem_hof', as: 'problem_hof'
146 get 'problem_hof(/:id)', action: 'problem_hof', as: 'problem_hof'
147 get 'current_score(/:group_id)', action: 'current_score', as: 'current_score'
147 get 'current_score(/:group_id)', action: 'current_score', as: 'current_score'
148 get 'max_score'
148 get 'max_score'
149 post 'show_max_score'
149 post 'show_max_score'
150 + get 'problem_hof(/:id)', action: 'problem_hof', as: 'problem_hof'
151 + get 'stuck'
152 + get 'cheat_report'
153 + post 'cheat_report'
154 + get 'cheat_scruntinize'
155 + post 'cheat_scruntinize'
150 end
156 end
151 #get 'report/current_score', to: 'report#current_score', as: 'report_current_score'
157 #get 'report/current_score', to: 'report#current_score', as: 'report_current_score'
152 #get 'report/problem_hof(/:id)', to: 'report#problem_hof', as: 'report_problem_hof'
158 #get 'report/problem_hof(/:id)', to: 'report#problem_hof', as: 'report_problem_hof'
153 #get "report/login"
159 #get "report/login"
154 #get 'report/max_score', to: 'report#max_score', as: 'report_max_score'
160 #get 'report/max_score', to: 'report#max_score', as: 'report_max_score'
155 #post 'report/show_max_score', to: 'report#show_max_score', as: 'report_show_max_score'
161 #post 'report/show_max_score', to: 'report#show_max_score', as: 'report_show_max_score'
156
162
157 resource :main, only: [], controller: 'main' do
163 resource :main, only: [], controller: 'main' do
158 get 'login'
164 get 'login'
159 get 'logout'
165 get 'logout'
160 get 'list'
166 get 'list'
161 get 'submission(/:id)', action: 'submission', as: 'main_submission'
167 get 'submission(/:id)', action: 'submission', as: 'main_submission'
162 get 'announcements'
168 get 'announcements'
163 get 'help'
169 get 'help'
164 post 'submit'
170 post 'submit'
165 end
171 end
166 #main
172 #main
167 #get "main/list"
173 #get "main/list"
168 #get 'main/submission(/:id)', to: 'main#submission', as: 'main_submission'
174 #get 'main/submission(/:id)', to: 'main#submission', as: 'main_submission'
169 #post 'main/submit', to: 'main#submit'
175 #post 'main/submit', to: 'main#submit'
170 #get 'main/announcements', to: 'main#announcements'
176 #get 'main/announcements', to: 'main#announcements'
171
177
172
178
173 #
179 #
174 get 'tasks/view/:file.:ext' => 'tasks#view'
180 get 'tasks/view/:file.:ext' => 'tasks#view'
175 get 'tasks/download/:id/:file.:ext' => 'tasks#download'
181 get 'tasks/download/:id/:file.:ext' => 'tasks#download'
176 get 'heartbeat/:id/edit' => 'heartbeat#edit'
182 get 'heartbeat/:id/edit' => 'heartbeat#edit'
177
183
178 #grader
184 #grader
179 get 'graders/list', to: 'graders#list', as: 'grader_list'
185 get 'graders/list', to: 'graders#list', as: 'grader_list'
180 namespace :graders do
186 namespace :graders do
181 get 'task/:id/:type', action: 'task', as: 'task'
187 get 'task/:id/:type', action: 'task', as: 'task'
182 get 'view/:id/:type', action: 'view', as: 'view'
188 get 'view/:id/:type', action: 'view', as: 'view'
183 get 'clear/:id', action: 'clear', as: 'clear'
189 get 'clear/:id', action: 'clear', as: 'clear'
184 get 'stop'
190 get 'stop'
185 get 'stop_all'
191 get 'stop_all'
186 get 'clear_all'
192 get 'clear_all'
187 get 'clear_terminated'
193 get 'clear_terminated'
188 get 'start_grading'
194 get 'start_grading'
189 get 'start_exam'
195 get 'start_exam'
190
196
191 end
197 end
192
198
193
199
194 # See how all your routes lay out with "rake routes"
200 # See how all your routes lay out with "rake routes"
195
201
196 # This is a legacy wild controller route that's not recommended for RESTful applications.
202 # This is a legacy wild controller route that's not recommended for RESTful applications.
197 # Note: This route will make all actions in every controller accessible via GET requests.
203 # Note: This route will make all actions in every controller accessible via GET requests.
198 # match ':controller(/:action(/:id))(.:format)', via: [:get, :post]
204 # match ':controller(/:action(/:id))(.:format)', via: [:get, :post]
199 end
205 end
You need to be logged in to leave comments. Login now