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

r760:eb69d79cfbdd - - 1 file changed: 12 inserted, 0 deleted

@@ -75,104 +75,116
75 collection do
75 collection do
76 get 'profile'
76 get 'profile'
77 post 'chg_passwd'
77 post 'chg_passwd'
78 end
78 end
79 end
79 end
80
80
81 resources :submissions do
81 resources :submissions do
82 member do
82 member do
83 get 'download'
83 get 'download'
84 get 'compiler_msg'
84 get 'compiler_msg'
85 get 'rejudge'
85 get 'rejudge'
86 get 'source'
86 get 'source'
87 end
87 end
88 collection do
88 collection do
89 get 'prob/:problem_id', to: 'submissions#index', as: 'problem'
89 get 'prob/:problem_id', to: 'submissions#index', as: 'problem'
90 get 'direct_edit_problem/:problem_id(/:user_id)', to: 'submissions#direct_edit_problem', as: 'direct_edit_problem'
90 get 'direct_edit_problem/:problem_id(/:user_id)', to: 'submissions#direct_edit_problem', as: 'direct_edit_problem'
91 get 'get_latest_submission_status/:uid/:pid', to: 'submissions#get_latest_submission_status', as: 'get_latest_submission_status'
91 get 'get_latest_submission_status/:uid/:pid', to: 'submissions#get_latest_submission_status', as: 'get_latest_submission_status'
92 end
92 end
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'
138 get 'current_score'
139 get 'max_score'
139 get 'max_score'
140 post 'show_max_score'
140 post 'show_max_score'
141 end
141 end
142 #get 'report/current_score', to: 'report#current_score', as: 'report_current_score'
142 #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'
143 #get 'report/problem_hof(/:id)', to: 'report#problem_hof', as: 'report_problem_hof'
144 #get "report/login"
144 #get "report/login"
145 #get 'report/max_score', to: 'report#max_score', as: 'report_max_score'
145 #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'
146 #post 'report/show_max_score', to: 'report#show_max_score', as: 'report_show_max_score'
147
147
148 resource :main, only: [], controller: 'main' do
148 resource :main, only: [], controller: 'main' do
149 get 'login'
149 get 'login'
150 get 'logout'
150 get 'logout'
151 get 'list'
151 get 'list'
152 get 'submission(/:id)', action: 'submission', as: 'main_submission'
152 get 'submission(/:id)', action: 'submission', as: 'main_submission'
153 get 'announcements'
153 get 'announcements'
154 get 'help'
154 get 'help'
155 post 'submit'
155 post 'submit'
156 end
156 end
157 #main
157 #main
158 #get "main/list"
158 #get "main/list"
159 #get 'main/submission(/:id)', to: 'main#submission', as: 'main_submission'
159 #get 'main/submission(/:id)', to: 'main#submission', as: 'main_submission'
160 #post 'main/submit', to: 'main#submit'
160 #post 'main/submit', to: 'main#submit'
161 #get 'main/announcements', to: 'main#announcements'
161 #get 'main/announcements', to: 'main#announcements'
162
162
163
163
164 #
164 #
165 get 'tasks/view/:file.:ext' => 'tasks#view'
165 get 'tasks/view/:file.:ext' => 'tasks#view'
166 get 'tasks/download/:id/:file.:ext' => 'tasks#download'
166 get 'tasks/download/:id/:file.:ext' => 'tasks#download'
167 get 'heartbeat/:id/edit' => 'heartbeat#edit'
167 get 'heartbeat/:id/edit' => 'heartbeat#edit'
168
168
169 #grader
169 #grader
170 get 'graders/list', to: 'graders#list', as: 'grader_list'
170 get 'graders/list', to: 'graders#list', as: 'grader_list'
171 + namespace :graders do
172 + get 'task/:id/:type', action: 'task', as: 'task'
173 + get 'view/:id/:type', action: 'view', as: 'view'
174 + get 'clear/:id', action: 'clear', as: 'clear'
175 + get 'stop'
176 + get 'stop_all'
177 + get 'clear_all'
178 + get 'clear_terminated'
179 + get 'start_grading'
180 + get 'start_exam'
181 +
182 + end
171
183
172
184
173 # See how all your routes lay out with "rake routes"
185 # See how all your routes lay out with "rake routes"
174
186
175 # This is a legacy wild controller route that's not recommended for RESTful applications.
187 # This is a legacy wild controller route that's not recommended for RESTful applications.
176 # Note: This route will make all actions in every controller accessible via GET requests.
188 # Note: This route will make all actions in every controller accessible via GET requests.
177 # match ':controller(/:action(/:id))(.:format)', via: [:get, :post]
189 # match ':controller(/:action(/:id))(.:format)', via: [:get, :post]
178 end
190 end
You need to be logged in to leave comments. Login now