Description:
remove lingering debug info
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r786:4e030454953c - - 3 files changed: 0 inserted, 6 deleted
@@ -145,24 +145,23 | |||||
|
145 | flash[:notice] = 'Error: the contest you are participating is over.' |
|
145 | flash[:notice] = 'Error: the contest you are participating is over.' |
|
146 | redirect_to :back |
|
146 | redirect_to :back |
|
147 | return false |
|
147 | return false |
|
148 | end |
|
148 | end |
|
149 | return true |
|
149 | return true |
|
150 | end |
|
150 | end |
|
151 |
|
151 | ||
|
152 | def is_request_ip_allowed? |
|
152 | def is_request_ip_allowed? |
|
153 | unless GraderConfiguration[WHITELIST_IGNORE_CONF_KEY] |
|
153 | unless GraderConfiguration[WHITELIST_IGNORE_CONF_KEY] |
|
154 | user_ip = IPAddr.new(request.remote_ip) |
|
154 | user_ip = IPAddr.new(request.remote_ip) |
|
155 |
|
155 | ||
|
156 | GraderConfiguration[WHITELIST_IP_CONF_KEY].delete(' ').split(',').each do |ips| |
|
156 | GraderConfiguration[WHITELIST_IP_CONF_KEY].delete(' ').split(',').each do |ips| |
|
157 | - puts "ip is #{ips}, user ip is #{user_ip}" |
|
||
|
158 | allow_ips = IPAddr.new(ips) |
|
157 | allow_ips = IPAddr.new(ips) |
|
159 | if allow_ips.include?(user_ip) |
|
158 | if allow_ips.include?(user_ip) |
|
160 | return true |
|
159 | return true |
|
161 | end |
|
160 | end |
|
162 | end |
|
161 | end |
|
163 | return false |
|
162 | return false |
|
164 | end |
|
163 | end |
|
165 | return true |
|
164 | return true |
|
166 | end |
|
165 | end |
|
167 |
|
166 | ||
|
168 | end |
|
167 | end |
@@ -66,27 +66,24 | |||||
|
66 | # GET /submissions/1/edit |
|
66 | # GET /submissions/1/edit |
|
67 | def edit |
|
67 | def edit |
|
68 | @submission = Submission.find(params[:id]) |
|
68 | @submission = Submission.find(params[:id]) |
|
69 | @source = @submission.source.to_s |
|
69 | @source = @submission.source.to_s |
|
70 | @problem = @submission.problem |
|
70 | @problem = @submission.problem |
|
71 | @lang_id = @submission.language.id |
|
71 | @lang_id = @submission.language.id |
|
72 | end |
|
72 | end |
|
73 |
|
73 | ||
|
74 |
|
74 | ||
|
75 | def get_latest_submission_status |
|
75 | def get_latest_submission_status |
|
76 | @problem = Problem.find(params[:pid]) |
|
76 | @problem = Problem.find(params[:pid]) |
|
77 | @submission = Submission.find_last_by_user_and_problem(params[:uid],params[:pid]) |
|
77 | @submission = Submission.find_last_by_user_and_problem(params[:uid],params[:pid]) |
|
78 | - puts User.find(params[:uid]).login |
|
||
|
79 | - puts Problem.find(params[:pid]).name |
|
||
|
80 | - puts 'nil' unless @submission |
|
||
|
81 | respond_to do |format| |
|
78 | respond_to do |format| |
|
82 | format.js |
|
79 | format.js |
|
83 | end |
|
80 | end |
|
84 | end |
|
81 | end |
|
85 |
|
82 | ||
|
86 | # GET /submissions/:id/rejudge |
|
83 | # GET /submissions/:id/rejudge |
|
87 | def rejudge |
|
84 | def rejudge |
|
88 | @submission = Submission.find(params[:id]) |
|
85 | @submission = Submission.find(params[:id]) |
|
89 | @task = @submission.task |
|
86 | @task = @submission.task |
|
90 | @task.status_inqueue! if @task |
|
87 | @task.status_inqueue! if @task |
|
91 | respond_to do |format| |
|
88 | respond_to do |format| |
|
92 | format.js |
|
89 | format.js |
@@ -6,26 +6,24 | |||||
|
6 | / %th Activated? |
|
6 | / %th Activated? |
|
7 | / %th Logged_in |
|
7 | / %th Logged_in |
|
8 | / %th Contest(s) |
|
8 | / %th Contest(s) |
|
9 | %th Remark |
|
9 | %th Remark |
|
10 | - @problems.each do |p| |
|
10 | - @problems.each do |p| |
|
11 | %th.text-right= p.name.gsub('_',' ') |
|
11 | %th.text-right= p.name.gsub('_',' ') |
|
12 | %th.text-right Total |
|
12 | %th.text-right Total |
|
13 | %th.text-right Passed |
|
13 | %th.text-right Passed |
|
14 | %tbody |
|
14 | %tbody |
|
15 | - sum = Array.new(@problems.count+1,0) |
|
15 | - sum = Array.new(@problems.count+1,0) |
|
16 | - nonzero = Array.new(@problems.count+1,0) |
|
16 | - nonzero = Array.new(@problems.count+1,0) |
|
17 | - full = Array.new(@problems.count+1,0) |
|
17 | - full = Array.new(@problems.count+1,0) |
|
18 | - - puts @scorearray |
|
||
|
19 | - - puts @problems.count |
|
||
|
20 | - @scorearray.each do |sc| |
|
18 | - @scorearray.each do |sc| |
|
21 | %tr |
|
19 | %tr |
|
22 | - total,num_passed = 0,0 |
|
20 | - total,num_passed = 0,0 |
|
23 | - sc.each_index do |i| |
|
21 | - sc.each_index do |i| |
|
24 | - if i == 0 |
|
22 | - if i == 0 |
|
25 | %td= link_to sc[i].login, stat_user_path(sc[i]) |
|
23 | %td= link_to sc[i].login, stat_user_path(sc[i]) |
|
26 | %td= sc[i].full_name |
|
24 | %td= sc[i].full_name |
|
27 | / %td= sc[i].activated |
|
25 | / %td= sc[i].activated |
|
28 | / %td= sc[i].try(:contest_stat).try(:started_at) ? 'yes' : 'no' |
|
26 | / %td= sc[i].try(:contest_stat).try(:started_at) ? 'yes' : 'no' |
|
29 | / %td= sc[i].contests.collect {|c| c.name}.join(', ') |
|
27 | / %td= sc[i].contests.collect {|c| c.name}.join(', ') |
|
30 | %td= sc[i].remark |
|
28 | %td= sc[i].remark |
|
31 | - else |
|
29 | - else |
You need to be logged in to leave comments.
Login now