Description:
saves and grades submission in standard mode
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r388:b5766b7ed3ec - - 2 files changed: 14 inserted, 2 deleted
@@ -32,120 +32,128 | |||||
|
32 | def login |
|
32 | def login |
|
33 | saved_notice = flash[:notice] |
|
33 | saved_notice = flash[:notice] |
|
34 | reset_session |
|
34 | reset_session |
|
35 | flash.now[:notice] = saved_notice |
|
35 | flash.now[:notice] = saved_notice |
|
36 |
|
36 | ||
|
37 | # EXPERIMENT: |
|
37 | # EXPERIMENT: |
|
38 | # Hide login if in single user mode and the url does not |
|
38 | # Hide login if in single user mode and the url does not |
|
39 | # explicitly specify /login |
|
39 | # explicitly specify /login |
|
40 | # |
|
40 | # |
|
41 | # logger.info "PATH: #{request.path}" |
|
41 | # logger.info "PATH: #{request.path}" |
|
42 | # if GraderConfiguration['system.single_user_mode'] and |
|
42 | # if GraderConfiguration['system.single_user_mode'] and |
|
43 | # request.path!='/main/login' |
|
43 | # request.path!='/main/login' |
|
44 | # @hidelogin = true |
|
44 | # @hidelogin = true |
|
45 | # end |
|
45 | # end |
|
46 |
|
46 | ||
|
47 | @announcements = Announcement.find_for_frontpage |
|
47 | @announcements = Announcement.find_for_frontpage |
|
48 | render :action => 'login', :layout => 'empty' |
|
48 | render :action => 'login', :layout => 'empty' |
|
49 | end |
|
49 | end |
|
50 |
|
50 | ||
|
51 | def list |
|
51 | def list |
|
52 | if session[:current_problem_id] |
|
52 | if session[:current_problem_id] |
|
53 | @current_problem = Problem.find(session[:current_problem_id]) |
|
53 | @current_problem = Problem.find(session[:current_problem_id]) |
|
54 | session[:current_problem_id] = nil |
|
54 | session[:current_problem_id] = nil |
|
55 | end |
|
55 | end |
|
56 | prepare_list_information |
|
56 | prepare_list_information |
|
57 | end |
|
57 | end |
|
58 |
|
58 | ||
|
59 | def help |
|
59 | def help |
|
60 | @user = User.find(session[:user_id]) |
|
60 | @user = User.find(session[:user_id]) |
|
61 | end |
|
61 | end |
|
62 |
|
62 | ||
|
63 | def submit |
|
63 | def submit |
|
64 | user = User.find(session[:user_id]) |
|
64 | user = User.find(session[:user_id]) |
|
65 |
|
65 | ||
|
66 | @submission = Submission.new |
|
66 | @submission = Submission.new |
|
67 | @current_problem = Problem.find(params[:submission][:problem_id]) |
|
67 | @current_problem = Problem.find(params[:submission][:problem_id]) |
|
68 |
|
68 | ||
|
69 | if !@current_problem |
|
69 | if !@current_problem |
|
70 | flash[:notice] = 'Error: คุณยังไม่ได้ระบุข้อที่ต้องการส่ง' |
|
70 | flash[:notice] = 'Error: คุณยังไม่ได้ระบุข้อที่ต้องการส่ง' |
|
71 | redirect_to :action => 'list' |
|
71 | redirect_to :action => 'list' |
|
72 | end |
|
72 | end |
|
73 |
|
73 | ||
|
74 | assignment = user.get_test_pair_assignment_for(@current_problem) |
|
74 | assignment = user.get_test_pair_assignment_for(@current_problem) |
|
75 | if !assignment |
|
75 | if !assignment |
|
76 | flash[:notice] = 'Error: คุณยังไม่ได้ดาวน์โหลดข้อมูลทดสอบ' |
|
76 | flash[:notice] = 'Error: คุณยังไม่ได้ดาวน์โหลดข้อมูลทดสอบ' |
|
77 | prepare_list_information |
|
77 | prepare_list_information |
|
78 | render :action => 'list' and return |
|
78 | render :action => 'list' and return |
|
79 | end |
|
79 | end |
|
80 | - if assignment.expired? |
|
80 | + if (assignment.expired?) and (!GraderConfiguration.standard_mode?) |
|
81 | flash[:notice] = 'Error: หมดเวลาส่งสำหรับข้อนี้' |
|
81 | flash[:notice] = 'Error: หมดเวลาส่งสำหรับข้อนี้' |
|
82 | prepare_list_information |
|
82 | prepare_list_information |
|
83 | render :action => 'list' and return |
|
83 | render :action => 'list' and return |
|
84 | end |
|
84 | end |
|
85 |
|
85 | ||
|
86 | @submission.problem = @current_problem |
|
86 | @submission.problem = @current_problem |
|
87 | @submission.user = user |
|
87 | @submission.user = user |
|
88 | @submission.language_id = 0 |
|
88 | @submission.language_id = 0 |
|
89 | if (params['file']) and (params['file']!='') |
|
89 | if (params['file']) and (params['file']!='') |
|
90 | @submission.source = params['file'].read |
|
90 | @submission.source = params['file'].read |
|
91 | @submission.source_filename = params['file'].original_filename |
|
91 | @submission.source_filename = params['file'].original_filename |
|
92 | end |
|
92 | end |
|
93 | if (params['output_file']) and (params['output_file']!='') |
|
93 | if (params['output_file']) and (params['output_file']!='') |
|
94 | @submission.output = params['output_file'].read |
|
94 | @submission.output = params['output_file'].read |
|
95 | end |
|
95 | end |
|
96 | @submission.submitted_at = Time.new.gmtime |
|
96 | @submission.submitted_at = Time.new.gmtime |
|
97 |
|
97 | ||
|
98 | if GraderConfiguration.time_limit_mode? and user.contest_finished? |
|
98 | if GraderConfiguration.time_limit_mode? and user.contest_finished? |
|
99 | @submission.errors.add(:base,"The contest is over.") |
|
99 | @submission.errors.add(:base,"The contest is over.") |
|
100 | prepare_list_information |
|
100 | prepare_list_information |
|
101 | render :action => 'list' and return |
|
101 | render :action => 'list' and return |
|
102 | end |
|
102 | end |
|
103 |
|
103 | ||
|
|
104 | + if GraderConfiguration.standard_mode? | ||
|
|
105 | + test_pair = assignment.test_pair | ||
|
|
106 | + result = test_pair.grade(@submission.output) | ||
|
|
107 | + @submission.points = result[:score]*100 / result[:full_score] | ||
|
|
108 | + @submission.grader_comment = result[:msg] | ||
|
|
109 | + @submission.graded_at = Time.now.gmtime | ||
|
|
110 | + end | ||
|
|
111 | + | ||
|
104 | if @submission.valid? |
|
112 | if @submission.valid? |
|
105 | if @submission.save == false |
|
113 | if @submission.save == false |
|
106 | flash[:notice] = 'Error saving your submission' |
|
114 | flash[:notice] = 'Error saving your submission' |
|
107 | elsif Task.create(:submission_id => @submission.id, |
|
115 | elsif Task.create(:submission_id => @submission.id, |
|
108 | :status => Task::STATUS_INQUEUE) == false |
|
116 | :status => Task::STATUS_INQUEUE) == false |
|
109 | flash[:notice] = 'Error adding your submission to task queue' |
|
117 | flash[:notice] = 'Error adding your submission to task queue' |
|
110 | else |
|
118 | else |
|
111 | flash[:notice] = 'จัดเก็บคำตอบและโปรแกรมที่คุณส่งเรียบร้อย' |
|
119 | flash[:notice] = 'จัดเก็บคำตอบและโปรแกรมที่คุณส่งเรียบร้อย' |
|
112 | end |
|
120 | end |
|
113 | else |
|
121 | else |
|
114 | prepare_list_information |
|
122 | prepare_list_information |
|
115 | render :action => 'list' and return |
|
123 | render :action => 'list' and return |
|
116 | end |
|
124 | end |
|
117 |
|
125 | ||
|
118 | if @current_problem |
|
126 | if @current_problem |
|
119 | session[:current_problem_id] = @current_problem.id |
|
127 | session[:current_problem_id] = @current_problem.id |
|
120 | end |
|
128 | end |
|
121 | redirect_to :action => 'list' |
|
129 | redirect_to :action => 'list' |
|
122 | end |
|
130 | end |
|
123 |
|
131 | ||
|
124 | def source |
|
132 | def source |
|
125 | submission = Submission.find(params[:id]) |
|
133 | submission = Submission.find(params[:id]) |
|
126 | if ((submission.user_id == session[:user_id]) and |
|
134 | if ((submission.user_id == session[:user_id]) and |
|
127 | (submission.problem != nil) and |
|
135 | (submission.problem != nil) and |
|
128 | (submission.problem.available)) |
|
136 | (submission.problem.available)) |
|
129 | send_data(submission.source, |
|
137 | send_data(submission.source, |
|
130 | {:filename => submission.download_filename, |
|
138 | {:filename => submission.download_filename, |
|
131 | :type => 'text/plain'}) |
|
139 | :type => 'text/plain'}) |
|
132 | else |
|
140 | else |
|
133 | flash[:notice] = 'Error viewing source' |
|
141 | flash[:notice] = 'Error viewing source' |
|
134 | redirect_to :action => 'list' |
|
142 | redirect_to :action => 'list' |
|
135 | end |
|
143 | end |
|
136 | end |
|
144 | end |
|
137 |
|
145 | ||
|
138 | def compiler_msg |
|
146 | def compiler_msg |
|
139 | @submission = Submission.find(params[:id]) |
|
147 | @submission = Submission.find(params[:id]) |
|
140 | if @submission.user_id == session[:user_id] |
|
148 | if @submission.user_id == session[:user_id] |
|
141 | render :action => 'compiler_msg', :layout => 'empty' |
|
149 | render :action => 'compiler_msg', :layout => 'empty' |
|
142 | else |
|
150 | else |
|
143 | flash[:notice] = 'Error viewing source' |
|
151 | flash[:notice] = 'Error viewing source' |
|
144 | redirect_to :action => 'list' |
|
152 | redirect_to :action => 'list' |
|
145 | end |
|
153 | end |
|
146 | end |
|
154 | end |
|
147 |
|
155 | ||
|
148 | def submission |
|
156 | def submission |
|
149 | @user = User.find(session[:user_id]) |
|
157 | @user = User.find(session[:user_id]) |
|
150 | @problems = @user.available_problems |
|
158 | @problems = @user.available_problems |
|
151 | if params[:id]==nil |
|
159 | if params[:id]==nil |
@@ -269,105 +277,109 | |||||
|
269 | {:filename => problem.name + '-input.txt', |
|
277 | {:filename => problem.name + '-input.txt', |
|
270 | :type => 'text/plain'}) |
|
278 | :type => 'text/plain'}) |
|
271 | end |
|
279 | end |
|
272 | end |
|
280 | end |
|
273 |
|
281 | ||
|
274 | def verifying_submit |
|
282 | def verifying_submit |
|
275 | user = User.find(session[:user_id]) |
|
283 | user = User.find(session[:user_id]) |
|
276 | problem_id = params[:id] |
|
284 | problem_id = params[:id] |
|
277 | problem = Problem.find(problem_id) |
|
285 | problem = Problem.find(problem_id) |
|
278 |
|
286 | ||
|
279 | if !problem or !problem.available |
|
287 | if !problem or !problem.available |
|
280 | flash[:notice] = 'Error: problem is not available' |
|
288 | flash[:notice] = 'Error: problem is not available' |
|
281 | redirect_to :action => 'list' and return |
|
289 | redirect_to :action => 'list' and return |
|
282 | end |
|
290 | end |
|
283 |
|
291 | ||
|
284 | @current_problem = problem |
|
292 | @current_problem = problem |
|
285 | test_pair = TestPair.get_for(problem, false) |
|
293 | test_pair = TestPair.get_for(problem, false) |
|
286 | if (params['output_file']) and (params['output_file']!='') |
|
294 | if (params['output_file']) and (params['output_file']!='') |
|
287 | output = params['output_file'].read |
|
295 | output = params['output_file'].read |
|
288 |
|
296 | ||
|
289 | @grading_result = test_pair.grade(output) |
|
297 | @grading_result = test_pair.grade(output) |
|
290 | prepare_list_information |
|
298 | prepare_list_information |
|
291 | render :action => 'list' and return |
|
299 | render :action => 'list' and return |
|
292 | else |
|
300 | else |
|
293 | flash[:notice] = 'Error: output file errors' |
|
301 | flash[:notice] = 'Error: output file errors' |
|
294 | prepare_list_information |
|
302 | prepare_list_information |
|
295 | render :action => 'list' and return |
|
303 | render :action => 'list' and return |
|
296 | end |
|
304 | end |
|
297 | end |
|
305 | end |
|
298 |
|
306 | ||
|
299 | protected |
|
307 | protected |
|
300 |
|
308 | ||
|
301 | def prepare_announcements(recent=nil) |
|
309 | def prepare_announcements(recent=nil) |
|
302 | if GraderConfiguration.show_tasks_to?(@user) |
|
310 | if GraderConfiguration.show_tasks_to?(@user) |
|
303 | @announcements = Announcement.find_published(true) |
|
311 | @announcements = Announcement.find_published(true) |
|
304 | else |
|
312 | else |
|
305 | @announcements = Announcement.find_published |
|
313 | @announcements = Announcement.find_published |
|
306 | end |
|
314 | end |
|
307 | if recent!=nil |
|
315 | if recent!=nil |
|
308 | recent_id = recent.to_i |
|
316 | recent_id = recent.to_i |
|
309 | @announcements = @announcements.find_all { |a| a.id > recent_id } |
|
317 | @announcements = @announcements.find_all { |a| a.id > recent_id } |
|
310 | end |
|
318 | end |
|
311 | end |
|
319 | end |
|
312 |
|
320 | ||
|
313 | def prepare_timeout_information(problems) |
|
321 | def prepare_timeout_information(problems) |
|
314 | @submission_timeouts = {} |
|
322 | @submission_timeouts = {} |
|
315 | problems.each do |problem| |
|
323 | problems.each do |problem| |
|
316 | assignment = @user.get_test_pair_assignment_for(problem) |
|
324 | assignment = @user.get_test_pair_assignment_for(problem) |
|
|
325 | + if GraderConfiguration.standard_mode? | ||
|
|
326 | + timeout = nil | ||
|
|
327 | + else | ||
|
317 | if assignment == nil |
|
328 | if assignment == nil |
|
318 | timeout = nil |
|
329 | timeout = nil |
|
319 | else |
|
330 | else |
|
320 | if (assignment.expired?) or (assignment.submitted) |
|
331 | if (assignment.expired?) or (assignment.submitted) |
|
321 | timeout = 0 |
|
332 | timeout = 0 |
|
322 | else |
|
333 | else |
|
323 | timeout = assignment.created_at + TEST_ASSIGNMENT_EXPIRATION_DURATION - Time.new.gmtime |
|
334 | timeout = assignment.created_at + TEST_ASSIGNMENT_EXPIRATION_DURATION - Time.new.gmtime |
|
324 | end |
|
335 | end |
|
325 | end |
|
336 | end |
|
|
337 | + end | ||
|
326 | @submission_timeouts[problem.id] = timeout |
|
338 | @submission_timeouts[problem.id] = timeout |
|
327 | end |
|
339 | end |
|
328 | end |
|
340 | end |
|
329 |
|
341 | ||
|
330 | def prepare_list_information |
|
342 | def prepare_list_information |
|
331 | @user = User.find(session[:user_id]) |
|
343 | @user = User.find(session[:user_id]) |
|
332 | if not GraderConfiguration.multicontests? |
|
344 | if not GraderConfiguration.multicontests? |
|
333 | @problems = @user.available_problems |
|
345 | @problems = @user.available_problems |
|
334 | else |
|
346 | else |
|
335 | @contest_problems = @user.available_problems_group_by_contests |
|
347 | @contest_problems = @user.available_problems_group_by_contests |
|
336 | @problems = @user.available_problems |
|
348 | @problems = @user.available_problems |
|
337 | end |
|
349 | end |
|
338 | @prob_submissions = {} |
|
350 | @prob_submissions = {} |
|
339 | @problems.each do |p| |
|
351 | @problems.each do |p| |
|
340 | sub = Submission.find_last_by_user_and_problem(@user.id,p.id) |
|
352 | sub = Submission.find_last_by_user_and_problem(@user.id,p.id) |
|
341 | if sub!=nil |
|
353 | if sub!=nil |
|
342 | @prob_submissions[p.id] = { :count => sub.number, :submission => sub } |
|
354 | @prob_submissions[p.id] = { :count => sub.number, :submission => sub } |
|
343 | else |
|
355 | else |
|
344 | @prob_submissions[p.id] = { :count => 0, :submission => nil } |
|
356 | @prob_submissions[p.id] = { :count => 0, :submission => nil } |
|
345 | end |
|
357 | end |
|
346 | end |
|
358 | end |
|
347 | prepare_announcements |
|
359 | prepare_announcements |
|
348 | prepare_timeout_information(@problems) |
|
360 | prepare_timeout_information(@problems) |
|
349 | end |
|
361 | end |
|
350 |
|
362 | ||
|
351 | def check_viewability |
|
363 | def check_viewability |
|
352 | @user = User.find(session[:user_id]) |
|
364 | @user = User.find(session[:user_id]) |
|
353 | if (!GraderConfiguration.show_tasks_to?(@user)) and |
|
365 | if (!GraderConfiguration.show_tasks_to?(@user)) and |
|
354 | ((action_name=='submission') or (action_name=='submit')) |
|
366 | ((action_name=='submission') or (action_name=='submit')) |
|
355 | redirect_to :action => 'list' and return |
|
367 | redirect_to :action => 'list' and return |
|
356 | end |
|
368 | end |
|
357 | end |
|
369 | end |
|
358 |
|
370 | ||
|
359 | def prepare_grading_result(submission) |
|
371 | def prepare_grading_result(submission) |
|
360 | if GraderConfiguration.task_grading_info.has_key? submission.problem.name |
|
372 | if GraderConfiguration.task_grading_info.has_key? submission.problem.name |
|
361 | grading_info = GraderConfiguration.task_grading_info[submission.problem.name] |
|
373 | grading_info = GraderConfiguration.task_grading_info[submission.problem.name] |
|
362 | else |
|
374 | else |
|
363 | # guess task info from problem.full_score |
|
375 | # guess task info from problem.full_score |
|
364 | cases = submission.problem.full_score / 10 |
|
376 | cases = submission.problem.full_score / 10 |
|
365 | grading_info = { |
|
377 | grading_info = { |
|
366 | 'testruns' => cases, |
|
378 | 'testruns' => cases, |
|
367 | 'testcases' => cases |
|
379 | 'testcases' => cases |
|
368 | } |
|
380 | } |
|
369 | end |
|
381 | end |
|
370 | @test_runs = [] |
|
382 | @test_runs = [] |
|
371 | if grading_info['testruns'].is_a? Integer |
|
383 | if grading_info['testruns'].is_a? Integer |
|
372 | trun_count = grading_info['testruns'] |
|
384 | trun_count = grading_info['testruns'] |
|
373 | trun_count.times do |i| |
|
385 | trun_count.times do |i| |
@@ -1,38 +1,38 | |||||
|
1 | <% selected_problem_id = @current_problem ? @current_problem.id : -1 %> |
|
1 | <% selected_problem_id = @current_problem ? @current_problem.id : -1 %> |
|
2 | <div class="submitbox"> |
|
2 | <div class="submitbox"> |
|
3 | <b>Problem:</b> <%= select 'submission', 'problem_id', |
|
3 | <b>Problem:</b> <%= select 'submission', 'problem_id', |
|
4 | [['กรุณาเลือกข้อที่ต้องการส่งหรือทดสอบ','-1']] + |
|
4 | [['กรุณาเลือกข้อที่ต้องการส่งหรือทดสอบ','-1']] + |
|
5 | @problems.collect {|p| [p.full_name, p.id]}, |
|
5 | @problems.collect {|p| [p.full_name, p.id]}, |
|
6 | { :selected => selected_problem_id }, |
|
6 | { :selected => selected_problem_id }, |
|
7 | { :onchange => 'TOIContest.problemSelectClick()' } %> |
|
7 | { :onchange => 'TOIContest.problemSelectClick()' } %> |
|
8 | </div> |
|
8 | </div> |
|
9 |
|
9 | ||
|
10 | <% @problems.each do |problem| %> |
|
10 | <% @problems.each do |problem| %> |
|
11 | <div class="submission-submit-divs" id="submission_submit_div_<%= problem.id %>_id" style="display: none;"> |
|
11 | <div class="submission-submit-divs" id="submission_submit_div_<%= problem.id %>_id" style="display: none;"> |
|
12 | <div style="border: 1px solid #c0c0c0; padding: 5px; margin: 5px 0 5px 0;"> |
|
12 | <div style="border: 1px solid #c0c0c0; padding: 5px; margin: 5px 0 5px 0;"> |
|
13 | <b><%= problem.full_name %>: ข้อมูลสำหรับตรวจสอบ</b> (สามารถดาวน์โหลดและส่งกี่ครั้งก็ได้,ไม่มีคะแนน): |
|
13 | <b><%= problem.full_name %>: ข้อมูลสำหรับตรวจสอบ</b> (สามารถดาวน์โหลดและส่งกี่ครั้งก็ได้,ไม่มีคะแนน): |
|
14 | <%= link_to 'ดาวน์โหลด input', :action => 'verifying_testcase', :id => problem.id %> |
|
14 | <%= link_to 'ดาวน์โหลด input', :action => 'verifying_testcase', :id => problem.id %> |
|
15 | <% if @current_problem and @current_problem.id == problem.id %> |
|
15 | <% if @current_problem and @current_problem.id == problem.id %> |
|
16 | <% if @grading_result %> |
|
16 | <% if @grading_result %> |
|
17 | | <b>ผลการตรวจ:</b> <%= "#{@grading_result[:score]}/#{@grading_result[:full_score]} [#{@grading_result[:msg]}]" %> |
|
17 | | <b>ผลการตรวจ:</b> <%= "#{@grading_result[:score]}/#{@grading_result[:full_score]} [#{@grading_result[:msg]}]" %> |
|
18 | <% end %> |
|
18 | <% end %> |
|
19 | <% end %> |
|
19 | <% end %> |
|
20 | <%= form_tag({:controller => 'main', :action => 'verifying_submit', :id => problem.id}, {:method => 'post', :multipart => true }) do %> |
|
20 | <%= form_tag({:controller => 'main', :action => 'verifying_submit', :id => problem.id}, {:method => 'post', :multipart => true }) do %> |
|
21 | ส่งคำตอบของข้อมูลสำหรับตรวจสอบ: |
|
21 | ส่งคำตอบของข้อมูลสำหรับตรวจสอบ: |
|
22 | <%= file_field_tag 'output_file' %> |
|
22 | <%= file_field_tag 'output_file' %> |
|
23 | <%= submit_tag 'Submit' %> |
|
23 | <%= submit_tag 'Submit' %> |
|
24 | <% end %> |
|
24 | <% end %> |
|
25 | </div> |
|
25 | </div> |
|
26 | <div style="border: 1px solid #c0c0c0; padding: 5px; margin: 5px 0 5px 0;"> |
|
26 | <div style="border: 1px solid #c0c0c0; padding: 5px; margin: 5px 0 5px 0;"> |
|
27 | <b><%= problem.full_name %>: ข้อมูลทดสอบจริง</b> (ส่งกี่ครั้งก็ได้ภายในเวลา 5 นาทีหลังดาวน์โหลด): |
|
27 | <b><%= problem.full_name %>: ข้อมูลทดสอบจริง</b> (ส่งกี่ครั้งก็ได้ภายในเวลา 5 นาทีหลังดาวน์โหลด): |
|
28 | <%= link_to 'ดาวน์โหลด input และเริ่มจับเวลา', { :action => 'testcase', :id => problem.id}, { :onclick => "return TOIContest.confirmDownload(#{problem.id})" } %> |
|
28 | <%= link_to 'ดาวน์โหลด input และเริ่มจับเวลา', { :action => 'testcase', :id => problem.id}, { :onclick => "return TOIContest.confirmDownload(#{problem.id})" } %> |
|
29 | <span id="submission_time_left_<%= problem.id %>_id"></span> |
|
29 | <span id="submission_time_left_<%= problem.id %>_id"></span> |
|
30 | <%= form_tag({:controller => 'main', :action => 'submit'}, {:method => 'post', :multipart => true, :id => "submission_form_#{problem.id}_id" }) do %> |
|
30 | <%= form_tag({:controller => 'main', :action => 'submit'}, {:method => 'post', :multipart => true, :id => "submission_form_#{problem.id}_id" }) do %> |
|
31 | <%= hidden_field_tag 'submission[problem_id]', problem.id %> |
|
31 | <%= hidden_field_tag 'submission[problem_id]', problem.id %> |
|
32 | ข้อมูลส่งออก: <%= file_field_tag 'output_file' %> |
|
32 | ข้อมูลส่งออก: <%= file_field_tag 'output_file' %> |
|
33 |
- โปรแกรม |
|
33 | + โปรแกรมของคุณ: <%= file_field_tag 'file' %> |
|
34 | <%= submit_tag 'Submit' %> |
|
34 | <%= submit_tag 'Submit' %> |
|
35 | <% end %> |
|
35 | <% end %> |
|
36 | </div> |
|
36 | </div> |
|
37 | </div> |
|
37 | </div> |
|
38 | <% end %> |
|
38 | <% end %> |
You need to be logged in to leave comments.
Login now