You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

code_work_tests.html.erb 3.7 kB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <h3>
  2. <%=l(:label_code_work_tests)%>
  3. </h3>
  4. &nbsp;
  5. <div class="autoscroll">
  6. <table class="list" style="width: 100%;table-layout: fixed">
  7. <thead>
  8. <tr>
  9. <th style="width: 50px;">
  10. <span style="float:left; margin-left:20px;">作业id</span>
  11. </th>
  12. <th style="width: 50px;">
  13. <span style="float:left; margin-left:20px;">作品id</span>
  14. </th>
  15. <th style="width: 60px;">
  16. 用户等待时间
  17. </th>
  18. <th style="width: 50px;">
  19. <span style="float:left; margin-left:20px;">语言</span>
  20. </th>
  21. <th style="width: 100px;">
  22. 测试完成时间
  23. </th>
  24. <th style="width: 80px;">
  25. <span style="float:left; margin-left:30px;">答题状态</span>
  26. </th>
  27. <th style="width: 50px;">
  28. <span style="float:left; margin-left:20px;">耗时</span>
  29. </th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. <% @code_work_tests.each do |test| %>
  34. <% if test['homework_id'] != nil %>
  35. <tr class="<%= cycle("odd", "even") %>">
  36. <td style="text-align: center; " title='<%=test['homework_id']%>'>
  37. <% if test['link_hwork'] %>
  38. <%=link_to(test['homework_id'], student_work_index_path(:homework => test['homework_id']))%>
  39. <% else %>
  40. <%= test['homework_id'] %>
  41. <% end %>
  42. </td>
  43. <td style="text-align: center; " title='<%=test['student_work_id']%>'>
  44. <% if test['link_swork'] && test['link_hwork'] %>
  45. <% if !test['is_test'] %>
  46. <%=link_to(test['student_work_id'], student_work_index_path(:homework => test['homework_id'],:student_work_id=>test['student_work_id']))%>
  47. <% else %>
  48. <%=link_to(test['student_work_id'], new_user_commit_homework_users_path(homework_id: test['homework_id'], is_test: true))%>
  49. <% end %>
  50. <% else %>
  51. <%= test['student_work_id'] %>
  52. <% end %>
  53. </td>
  54. <td style="text-align: center;">
  55. <% if test.wait_time != 0 %>
  56. <%=test.wait_time.to_s+"毫秒" %>
  57. <% else %>
  58. <%="未记录"%>
  59. <% end %>
  60. </td>
  61. <td align="center">
  62. <%=%W(C C++ Python Java).at(test['language'].to_i - 1)%>
  63. </td>
  64. <td align="center">
  65. <%=Time.parse(test.created_at.to_s).strftime("%Y-%m-%d %H:%M:%S")%>
  66. </td>
  67. <td align="center">
  68. <% if test.status == 0 %>
  69. <%= "答题正确" %>
  70. <% elsif test.status == -2 %>
  71. <%= "编译错误" %>
  72. <% elsif test.status == 2 %>
  73. <%= "代码超时" %>
  74. <% elsif test.status == -3 %>
  75. <%= "请求超时" %>
  76. <% elsif test.status == -4 %>
  77. <%= "judge代码出错!" %>
  78. <% elsif test.status == -5 %>
  79. <%= "trustie代码出错!" %>
  80. <% else %>
  81. <%= "答题错误" %>
  82. <% end %>
  83. </td>
  84. <td class="center">
  85. <% if test.time_used > 0 %>
  86. <%=test.time_used.to_s+"毫秒"%>
  87. <% end %>
  88. </td>
  89. </tr>
  90. <% end %>
  91. <% end %>
  92. </tbody>
  93. </table>
  94. </div>
  95. <div class="pagination">
  96. <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
  97. </div>
  98. <% html_title(l(:label_code_work_tests)) -%>

软件技术创新是当今国家整体创新能力的重要基础和发展引擎。近年来,大众参与的软件创新与创业活动已经成为网络时代软件开发和应用的新形态,正在快速改变着全球软件创新模式和软件产业格局。 ...