<% content_for :header_tags do %> <%= javascript_include_tag 'homework','baiduTemplate' %> <% end %> <% if @homework.homework_type == 1 %>
提交作品
<%= form_for(@student_work, :html => { :multipart => true }, :url => {:controller => 'student_work', :action => 'create', :homework => @homework.id }) do |f|%>
<% if @homework.homework_type == 1%>
提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
<% end%>

<%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %> <% if @homework.homework_type != 2%> 项目信息 <% end%>

<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>

<% if @homework.homework_type == 2 && @homework.homework_detail_programing%> <%= f.text_area "description", :class => "w620 hwork_txt h400", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();", :value => @homework.homework_detail_programing.language == "1" ? c_stantard_code_student : c_stantard_code_student_%> <% else %> <%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%> <% end%>

<% if @homework.homework_type != 2%>

<%= render :partial => 'attachments/new_form' %>

<% end%>

提交作品 <%= link_to "返  回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white mt10 ml10"%>

<% end%>
<% else %>
提交作品
<%= @homework.name %>
截止时间:<%= @homework.end_time %>
<%= @homework.user.show_name %>

<%= @homework.description %>
输入 2 1 1 4 4 2 3 6 5
输出 15

注:迟交扣2分,缺评一个作品扣2

<%= form_for(@student_work, :html => { :multipart => true }, :url => {:controller => 'student_work', :action => 'create', :student_work_id => @student_work.id, :homework => @homework.id }, :method => :post) do |f|%>
请使用 <%= @homework.language_name %> 语言编写
<%= f.text_area :name, id: 'program-title', class:"InputBox W700", placeholder:"请概括你的代码的功能" %>
<%= f.text_area :description, id: 'program-src', class:" W700 H150", placeholder:"请贴入你的代码", rows: 10 %>
<% end %>
<% @student_work.student_work_tests.each_with_index do |test, index| %>

第<%= @student_work.student_work_tests.count - index%>次测试

<%= test.created_at.to_s(:db) %>
<% if test.status.to_i == -2 %>
<%= test.results.first %>
<% else %>
<% end %> <% end %>
<% end %>