编译结果显示错误

This commit is contained in:
sw 2015-07-22 16:33:27 +08:00
parent dd86c769b5
commit 01576449c8
2 changed files with 4 additions and 3 deletions

View File

@ -2,5 +2,5 @@ class HomeworkTest < ActiveRecord::Base
attr_accessible :input, :output, :homework_common_id attr_accessible :input, :output, :homework_common_id
belongs_to :homework_common belongs_to :homework_common
has_one :student_work_test has_many :student_work_test
end end

View File

@ -47,8 +47,9 @@
<td class="td_tit"> <td class="td_tit">
<%= test.output%> <%= test.output%>
</td> </td>
<td class="td_50 c_red"><%= test.student_work_test.nil? ? "正在编译" : test.student_work_test.status_to_s%></td> <% student_work_test = StudentWorkTest.where(:homework_test_id => test.id,:student_work_id => @work.id).first%>
<input type="hidden" value="<%= test.student_work_test.result if test.student_work_test%>"> <td class="td_50 c_red"><%= student_work_test.nil? ? "正在编译" : student_work_test.status_to_s%></td>
<input type="hidden" value="<%= student_work_test.result if student_work_test%>">
</tr> </tr>
<% end%> <% end%>