diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb
index ae2237bdc..6009dfbb5 100644
--- a/app/views/student_work/_programing_work_show.html.erb
+++ b/app/views/student_work/_programing_work_show.html.erb
@@ -55,8 +55,8 @@
<% test.results.reverse.each_with_index do |x, i| %>
+ <% unless x.nil? %>
-
-
测试<%=test.results.size-i%>
<% if x["status"].to_i != 0 %>
<% if x["status"].to_i == 2 %>
@@ -82,6 +82,7 @@
<% end %>
+ <% end %>
<% end %>
diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb
index e5e2a385c..e33362a0a 100644
--- a/app/views/users/new_user_commit_homework.html.erb
+++ b/app/views/users/new_user_commit_homework.html.erb
@@ -30,7 +30,7 @@
超时!
- 测试错误!
+ 测试错误!
您的输出:
@@ -133,7 +133,9 @@
<% else %>
- <% test.results.reverse.each_with_index do |x, i| %>
+ <% logger.error("################################################{test.results}") %>
+ <% test.results.reverse.each_with_index do |x, i| %>
+ <% unless x.nil? %>
- 测试<%=test.results.size-i%>
<% if x["status"].to_i != 0 %>
<% if x["status"].to_i == 2 %>
@@ -159,6 +161,7 @@
<% end %>
<% end %>
+ <% end %>
<% end %>
diff --git a/app/views/users/user_commit_homework.html.erb b/app/views/users/user_commit_homework.html.erb
index 40fd9d241..cab3c55ab 100644
--- a/app/views/users/user_commit_homework.html.erb
+++ b/app/views/users/user_commit_homework.html.erb
@@ -101,6 +101,7 @@
<% test.results.reverse.each_with_index do |x, i| %>
+ <% unless x.nil? %>
- 测试<%=test.results.size-i%>
<% if x["status"].to_i != 0 %>
<% if x["status"].to_i == 2 %>
@@ -125,6 +126,7 @@
<% end %>
+ <% end %>
<% end %>
diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js
index b03ddf1bf..3bca1606c 100644
--- a/public/javascripts/homework.js
+++ b/public/javascripts/homework.js
@@ -97,8 +97,8 @@ $(function(){
alert("您的答案超时了, 请检查代码是否存在死循环的错误.");
} else {
alert("测试失败,服务器出错.");
- return;
}
+ return;
});
};