Description:
Fixed Individual Contest confirmation
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r371:6d2e9920049d - - 2 files changed: 2 inserted, 2 deleted
@@ -183,25 +183,25 | |||||
|
183 | if params.has_key? 'recent' |
|
183 | if params.has_key? 'recent' |
|
184 | prepare_announcements(params[:recent]) |
|
184 | prepare_announcements(params[:recent]) |
|
185 | else |
|
185 | else |
|
186 | prepare_announcements |
|
186 | prepare_announcements |
|
187 | end |
|
187 | end |
|
188 | render(:partial => 'announcement', |
|
188 | render(:partial => 'announcement', |
|
189 | :collection => @announcements, |
|
189 | :collection => @announcements, |
|
190 | :locals => {:announcement_effect => true}) |
|
190 | :locals => {:announcement_effect => true}) |
|
191 | end |
|
191 | end |
|
192 |
|
192 | ||
|
193 | def confirm_contest_start |
|
193 | def confirm_contest_start |
|
194 | user = User.find(session[:user_id]) |
|
194 | user = User.find(session[:user_id]) |
|
195 |
- if request.method == |
|
195 | + if request.method == 'POST' |
|
196 | user.update_start_time |
|
196 | user.update_start_time |
|
197 | redirect_to :action => 'list' |
|
197 | redirect_to :action => 'list' |
|
198 | else |
|
198 | else |
|
199 | @contests = user.contests |
|
199 | @contests = user.contests |
|
200 | @user = user |
|
200 | @user = user |
|
201 | end |
|
201 | end |
|
202 | end |
|
202 | end |
|
203 |
|
203 | ||
|
204 | protected |
|
204 | protected |
|
205 |
|
205 | ||
|
206 | def prepare_announcements(recent=nil) |
|
206 | def prepare_announcements(recent=nil) |
|
207 | if GraderConfiguration.show_tasks_to?(@user) |
|
207 | if GraderConfiguration.show_tasks_to?(@user) |
@@ -3,14 +3,14 | |||||
|
3 | .announcementbox |
|
3 | .announcementbox |
|
4 | %span{:class => 'title'} |
|
4 | %span{:class => 'title'} |
|
5 | =t 'main.confirm_contest_start.box_title' |
|
5 | =t 'main.confirm_contest_start.box_title' |
|
6 | .announcement |
|
6 | .announcement |
|
7 | %center |
|
7 | %center |
|
8 | =t 'main.confirm_contest_start.contest_list' |
|
8 | =t 'main.confirm_contest_start.contest_list' |
|
9 | - @contests.each do |contest| |
|
9 | - @contests.each do |contest| |
|
10 | = contest.title |
|
10 | = contest.title |
|
11 | %br |
|
11 | %br |
|
12 |
|
12 | ||
|
13 | =t 'main.confirm_contest_start.timer_starts_after_click' |
|
13 | =t 'main.confirm_contest_start.timer_starts_after_click' |
|
14 |
|
14 | ||
|
15 |
- = form_tag :action => 'confirm_contest_start' |
|
15 | + = form_tag :action => 'confirm_contest_start' do |
|
16 | = submit_tag t('main.confirm_contest_start.start_button'), :confirm => t('main.confirm_contest_start.start_button_confirm') |
|
16 | = submit_tag t('main.confirm_contest_start.start_button'), :confirm => t('main.confirm_contest_start.start_button_confirm') |
You need to be logged in to leave comments.
Login now