编译结果显示错误
This commit is contained in:
parent
dd86c769b5
commit
01576449c8
|
@ -2,5 +2,5 @@ class HomeworkTest < ActiveRecord::Base
|
|||
attr_accessible :input, :output, :homework_common_id
|
||||
|
||||
belongs_to :homework_common
|
||||
has_one :student_work_test
|
||||
has_many :student_work_test
|
||||
end
|
||||
|
|
|
@ -47,8 +47,9 @@
|
|||
<td class="td_tit">
|
||||
<%= test.output%>
|
||||
</td>
|
||||
<td class="td_50 c_red"><%= test.student_work_test.nil? ? "正在编译" : test.student_work_test.status_to_s%></td>
|
||||
<input type="hidden" value="<%= test.student_work_test.result if test.student_work_test%>">
|
||||
<% student_work_test = StudentWorkTest.where(:homework_test_id => test.id,:student_work_id => @work.id).first%>
|
||||
<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>
|
||||
<% end%>
|
||||
|
||||
|
|
Loading…
Reference in New Issue