Show More
Commit Description:
grades contest submissions
Commit Description:
grades contest submissions
References:
File last commit:
Show/Diff file:
Action:
app/views/main/_submission_box.html.erb
| 38 lines
| 2.7 KiB
| text/plain
| TextLexer
|
|
r383 | <% selected_problem_id = @current_problem ? @current_problem.id : -1 %> | ||
|
r381 | <div class="submitbox"> | ||
<b>Problem:</b> <%= select 'submission', 'problem_id', | ||||
[['กรุณาเลือกข้อที่ต้องการส่งหรือทดสอบ','-1']] + | ||||
@problems.collect {|p| [p.full_name, p.id]}, | ||||
|
r383 | { :selected => selected_problem_id }, | ||
|
r382 | { :onchange => 'TOIContest.problemSelectClick()' } %> | ||
|
r381 | </div> | ||
<% @problems.each do |problem| %> | ||||
|
r383 | <div class="submission-submit-divs" id="submission_submit_div_<%= problem.id %>_id" style="display: none;"> | ||
|
r381 | <div style="border: 1px solid #c0c0c0; padding: 5px; margin: 5px 0 5px 0;"> | ||
|
r382 | <b><%= problem.full_name %>: ข้อมูลสำหรับตรวจสอบ</b> (สามารถดาวน์โหลดและส่งกี่ครั้งก็ได้,ไม่มีคะแนน): | ||
|
r381 | <%= link_to 'ดาวน์โหลด input', :action => 'verifying_testcase', :id => problem.id %> | ||
|
r382 | <% if @current_problem and @current_problem.id == problem.id %> | ||
|
r381 | <% if @grading_result %> | ||
|
r382 | | <b>ผลการตรวจ:</b> <%= "#{@grading_result[:score]}/#{@grading_result[:full_score]} [#{@grading_result[:msg]}]" %> | ||
|
r381 | <% end %> | ||
<% end %> | ||||
|
r382 | <%= form_tag({:controller => 'main', :action => 'verifying_submit', :id => problem.id}, {:method => 'post', :multipart => true }) do %> | ||
|
r381 | ส่งคำตอบของข้อมูลสำหรับตรวจสอบ: | ||
<%= file_field_tag 'output_file' %> | ||||
<%= submit_tag 'Submit' %> | ||||
<% end %> | ||||
</div> | ||||
<div style="border: 1px solid #c0c0c0; padding: 5px; margin: 5px 0 5px 0;"> | ||||
<b><%= problem.full_name %>: ข้อมูลทดสอบจริง</b> (ส่งกี่ครั้งก็ได้ภายในเวลา 5 นาทีหลังดาวน์โหลด): | ||||
|
r383 | <%= link_to 'ดาวน์โหลด input และเริ่มจับเวลา', { :action => 'testcase', :id => problem.id}, { :onclick => "return TOIContest.confirmDownload(#{problem.id})" } %> | ||
|
r381 | <span id="submission_time_left_<%= problem.id %>_id"></span> | ||
|
r383 | <%= form_tag({:controller => 'main', :action => 'submit'}, {:method => 'post', :multipart => true, :id => "submission_form_#{problem.id}_id" }) do %> | ||
<%= hidden_field_tag 'submission[problem_id]', problem.id %> | ||||
|
r381 | ข้อมูลส่งออก: <%= file_field_tag 'output_file' %> | ||
|
r383 | โปรแกรมคำตอบ: <%= file_field_tag 'file' %> | ||
|
r381 | <%= submit_tag 'Submit' %> | ||
<% end %> | ||||
</div> | ||||
</div> | ||||
|
r33 | <% end %> | ||