Description:
fix report link
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r763:b90509d73a81 - - 2 files changed: 8 inserted, 2 deleted
@@ -1,29 +1,29 | |||||
|
1 |
|
1 | ||
|
2 | /- if params[:id] |
|
2 | /- if params[:id] |
|
3 | / %h1 Tasks Hall of Fame |
|
3 | / %h1 Tasks Hall of Fame |
|
4 | / = link_to('[back to All-Time Hall of Fame]', action: 'problem_hof', id: nil ) |
|
4 | / = link_to('[back to All-Time Hall of Fame]', action: 'problem_hof', id: nil ) |
|
5 | /- else |
|
5 | /- else |
|
6 | / %h1 All-Time Hall of Fame |
|
6 | / %h1 All-Time Hall of Fame |
|
7 |
|
7 | ||
|
8 | .panel.panel-info |
|
8 | .panel.panel-info |
|
9 | .panel-heading |
|
9 | .panel-heading |
|
10 | Select Task |
|
10 | Select Task |
|
11 | .panel-body |
|
11 | .panel-body |
|
12 | .form-inline |
|
12 | .form-inline |
|
13 | = select 'report', |
|
13 | = select 'report', |
|
14 | 'problem_id', |
|
14 | 'problem_id', |
|
15 |
- @problems.collect {|p| ["[#{p.name}] #{p.full_name}", |
|
15 | + @problems.collect {|p| ["[#{p.name}] #{p.full_name}", problem_hof_report_path(p.id)]}, |
|
16 |
- {:selected => |
|
16 | + {:selected => problem_hof_report_path(@problem)}, |
|
17 | { class: 'select2 form-control' } |
|
17 | { class: 'select2 form-control' } |
|
18 | %button.btn.btn-primary.btn-sm.go-button#problem_go{data: {source: "#report_problem_id"}} Go |
|
18 | %button.btn.btn-primary.btn-sm.go-button#problem_go{data: {source: "#report_problem_id"}} Go |
|
19 |
|
19 | ||
|
20 |
|
20 | ||
|
21 | - unless params[:id] |
|
21 | - unless params[:id] |
|
22 | /=render partial: 'all_time_hof' |
|
22 | /=render partial: 'all_time_hof' |
|
23 | Please select a problem. |
|
23 | Please select a problem. |
|
24 | - else |
|
24 | - else |
|
25 | %h1 [#{Problem.find(params[:id]).name}] #{Problem.find(params[:id]).full_name} |
|
25 | %h1 [#{Problem.find(params[:id]).name}] #{Problem.find(params[:id]).full_name} |
|
26 | %h2 Submission History |
|
26 | %h2 Submission History |
|
27 | =render partial: 'application/bar_graph', locals: { histogram: @histogram } |
|
27 | =render partial: 'application/bar_graph', locals: { histogram: @histogram } |
|
28 | =render partial: 'task_hof' |
|
28 | =render partial: 'task_hof' |
|
29 |
|
29 |
@@ -93,96 +93,102 | |||||
|
93 | end |
|
93 | end |
|
94 |
|
94 | ||
|
95 |
|
95 | ||
|
96 | #user admin |
|
96 | #user admin |
|
97 | resources :user_admin do |
|
97 | resources :user_admin do |
|
98 | collection do |
|
98 | collection do |
|
99 | match 'bulk_manage', via: [:get, :post] |
|
99 | match 'bulk_manage', via: [:get, :post] |
|
100 | get 'bulk_mail' |
|
100 | get 'bulk_mail' |
|
101 | get 'user_stat' |
|
101 | get 'user_stat' |
|
102 | get 'import' |
|
102 | get 'import' |
|
103 | get 'new_list' |
|
103 | get 'new_list' |
|
104 | get 'admin' |
|
104 | get 'admin' |
|
105 | get 'active' |
|
105 | get 'active' |
|
106 | get 'mass_mailing' |
|
106 | get 'mass_mailing' |
|
107 | get 'revoke_admin' |
|
107 | get 'revoke_admin' |
|
108 | post 'grant_admin' |
|
108 | post 'grant_admin' |
|
109 | match 'create_from_list', via: [:get, :post] |
|
109 | match 'create_from_list', via: [:get, :post] |
|
110 | match 'random_all_passwords', via: [:get, :post] |
|
110 | match 'random_all_passwords', via: [:get, :post] |
|
111 | end |
|
111 | end |
|
112 | member do |
|
112 | member do |
|
113 | get 'clear_last_ip' |
|
113 | get 'clear_last_ip' |
|
114 | end |
|
114 | end |
|
115 | end |
|
115 | end |
|
116 |
|
116 | ||
|
117 | resources :contest_management, only: [:index] do |
|
117 | resources :contest_management, only: [:index] do |
|
118 | collection do |
|
118 | collection do |
|
119 | get 'user_stat' |
|
119 | get 'user_stat' |
|
120 | get 'clear_stat' |
|
120 | get 'clear_stat' |
|
121 | get 'clear_all_stat' |
|
121 | get 'clear_all_stat' |
|
122 | get 'change_contest_mode' |
|
122 | get 'change_contest_mode' |
|
123 | end |
|
123 | end |
|
124 | end |
|
124 | end |
|
125 |
|
125 | ||
|
126 | #get 'user_admin', to: 'user_admin#index' |
|
126 | #get 'user_admin', to: 'user_admin#index' |
|
127 | #get 'user_admin/bulk_manage', to: 'user_admin#bulk_manage', as: 'bulk_manage_user_admin' |
|
127 | #get 'user_admin/bulk_manage', to: 'user_admin#bulk_manage', as: 'bulk_manage_user_admin' |
|
128 | #post 'user_admin', to: 'user_admin#create' |
|
128 | #post 'user_admin', to: 'user_admin#create' |
|
129 | #delete 'user_admin/:id', to: 'user_admin#destroy', as: 'user_admin_destroy' |
|
129 | #delete 'user_admin/:id', to: 'user_admin#destroy', as: 'user_admin_destroy' |
|
130 |
|
130 | ||
|
131 | #singular resource |
|
131 | #singular resource |
|
132 | #---- BEWARE ---- singular resource maps to plural controller by default, we can override by provide controller name directly |
|
132 | #---- BEWARE ---- singular resource maps to plural controller by default, we can override by provide controller name directly |
|
133 | #report |
|
133 | #report |
|
134 | resource :report, only: [], controller: 'report' do |
|
134 | resource :report, only: [], controller: 'report' do |
|
135 | get 'login' |
|
135 | get 'login' |
|
136 | get 'multiple_login' |
|
136 | get 'multiple_login' |
|
137 | get 'problem_hof/:id', action: 'problem_hof' |
|
137 | get 'problem_hof/:id', action: 'problem_hof' |
|
138 | get 'current_score(/:group_id)', action: 'current_score', as: 'current_score' |
|
138 | get 'current_score(/:group_id)', action: 'current_score', as: 'current_score' |
|
139 | get 'max_score' |
|
139 | get 'max_score' |
|
140 | post 'show_max_score' |
|
140 | post 'show_max_score' |
|
|
141 | + get 'problem_hof(/:id)', action: 'problem_hof', as: 'problem_hof' | ||
|
|
142 | + get 'stuck' | ||
|
|
143 | + get 'cheat_report' | ||
|
|
144 | + post 'cheat_report' | ||
|
|
145 | + get 'cheat_scruntinize' | ||
|
|
146 | + post 'cheat_scruntinize' | ||
|
141 | end |
|
147 | end |
|
142 | #get 'report/current_score', to: 'report#current_score', as: 'report_current_score' |
|
148 | #get 'report/current_score', to: 'report#current_score', as: 'report_current_score' |
|
143 | #get 'report/problem_hof(/:id)', to: 'report#problem_hof', as: 'report_problem_hof' |
|
149 | #get 'report/problem_hof(/:id)', to: 'report#problem_hof', as: 'report_problem_hof' |
|
144 | #get "report/login" |
|
150 | #get "report/login" |
|
145 | #get 'report/max_score', to: 'report#max_score', as: 'report_max_score' |
|
151 | #get 'report/max_score', to: 'report#max_score', as: 'report_max_score' |
|
146 | #post 'report/show_max_score', to: 'report#show_max_score', as: 'report_show_max_score' |
|
152 | #post 'report/show_max_score', to: 'report#show_max_score', as: 'report_show_max_score' |
|
147 |
|
153 | ||
|
148 | resource :main, only: [], controller: 'main' do |
|
154 | resource :main, only: [], controller: 'main' do |
|
149 | get 'login' |
|
155 | get 'login' |
|
150 | get 'logout' |
|
156 | get 'logout' |
|
151 | get 'list' |
|
157 | get 'list' |
|
152 | get 'submission(/:id)', action: 'submission', as: 'main_submission' |
|
158 | get 'submission(/:id)', action: 'submission', as: 'main_submission' |
|
153 | get 'announcements' |
|
159 | get 'announcements' |
|
154 | get 'help' |
|
160 | get 'help' |
|
155 | post 'submit' |
|
161 | post 'submit' |
|
156 | end |
|
162 | end |
|
157 | #main |
|
163 | #main |
|
158 | #get "main/list" |
|
164 | #get "main/list" |
|
159 | #get 'main/submission(/:id)', to: 'main#submission', as: 'main_submission' |
|
165 | #get 'main/submission(/:id)', to: 'main#submission', as: 'main_submission' |
|
160 | #post 'main/submit', to: 'main#submit' |
|
166 | #post 'main/submit', to: 'main#submit' |
|
161 | #get 'main/announcements', to: 'main#announcements' |
|
167 | #get 'main/announcements', to: 'main#announcements' |
|
162 |
|
168 | ||
|
163 |
|
169 | ||
|
164 | # |
|
170 | # |
|
165 | get 'tasks/view/:file.:ext' => 'tasks#view' |
|
171 | get 'tasks/view/:file.:ext' => 'tasks#view' |
|
166 | get 'tasks/download/:id/:file.:ext' => 'tasks#download' |
|
172 | get 'tasks/download/:id/:file.:ext' => 'tasks#download' |
|
167 | get 'heartbeat/:id/edit' => 'heartbeat#edit' |
|
173 | get 'heartbeat/:id/edit' => 'heartbeat#edit' |
|
168 |
|
174 | ||
|
169 | #grader |
|
175 | #grader |
|
170 | get 'graders/list', to: 'graders#list', as: 'grader_list' |
|
176 | get 'graders/list', to: 'graders#list', as: 'grader_list' |
|
171 | namespace :graders do |
|
177 | namespace :graders do |
|
172 | get 'task/:id/:type', action: 'task', as: 'task' |
|
178 | get 'task/:id/:type', action: 'task', as: 'task' |
|
173 | get 'view/:id/:type', action: 'view', as: 'view' |
|
179 | get 'view/:id/:type', action: 'view', as: 'view' |
|
174 | get 'clear/:id', action: 'clear', as: 'clear' |
|
180 | get 'clear/:id', action: 'clear', as: 'clear' |
|
175 | get 'stop' |
|
181 | get 'stop' |
|
176 | get 'stop_all' |
|
182 | get 'stop_all' |
|
177 | get 'clear_all' |
|
183 | get 'clear_all' |
|
178 | get 'clear_terminated' |
|
184 | get 'clear_terminated' |
|
179 | get 'start_grading' |
|
185 | get 'start_grading' |
|
180 | get 'start_exam' |
|
186 | get 'start_exam' |
|
181 |
|
187 | ||
|
182 | end |
|
188 | end |
|
183 |
|
189 | ||
|
184 |
|
190 | ||
|
185 | # See how all your routes lay out with "rake routes" |
|
191 | # See how all your routes lay out with "rake routes" |
|
186 |
|
192 | ||
|
187 | # This is a legacy wild controller route that's not recommended for RESTful applications. |
|
193 | # This is a legacy wild controller route that's not recommended for RESTful applications. |
|
188 | # Note: This route will make all actions in every controller accessible via GET requests. |
|
194 | # Note: This route will make all actions in every controller accessible via GET requests. |
You need to be logged in to leave comments.
Login now