<%=l(:label_code_work_tests)%>

 
<% @code_work_tests.each do |test| %> <% if test['homework_id'] != nil %> "> <% end %> <% end %>
作业id 作品id 用户等待时间 语言 测试完成时间 答题状态 耗时
'> <% if test['link_hwork'] %> <%=link_to(test['homework_id'], student_work_index_path(:homework => test['homework_id']))%> <% else %> <%= test['homework_id'] %> <% end %> '> <% if test['link_swork'] && test['link_hwork'] %> <% if !test['is_test'] %> <%=link_to(test['student_work_id'], student_work_index_path(:homework => test['homework_id'],:student_work_id=>test['student_work_id']))%> <% else %> <%=link_to(test['student_work_id'], new_user_commit_homework_users_path(homework_id: test['homework_id'], is_test: true))%> <% end %> <% else %> <%= test['student_work_id'] %> <% end %> <% if test.wait_time != 0 %> <%=test.wait_time.to_s+"毫秒" %> <% else %> <%="未记录"%> <% end %> <%=%W(C C++ Python Java).at(test['language'].to_i - 1)%> <%=Time.parse(test.created_at.to_s).strftime("%Y-%m-%d %H:%M:%S")%> <% if test.status == 0 %> <%= "答题正确" %> <% elsif test.status == -2 %> <%= "编译错误" %> <% elsif test.status == 2 %> <%= "代码超时" %> <% elsif test.status == -3 %> <%= "请求超时" %> <% elsif test.status == -4 %> <%= "judge代码出错!" %> <% elsif test.status == -5 %> <%= "trustie代码出错!" %> <% else %> <%= "答题错误" %> <% end %> <% if test.time_used > 0 %> <%=test.time_used.to_s+"毫秒"%> <% end %>
<% html_title(l(:label_code_work_tests)) -%>