已存在的输入输出测试的name改为测试的id
This commit is contained in:
parent
02d7215f6f
commit
d23189b933
|
@ -67,15 +67,15 @@
|
|||
</li>
|
||||
|
||||
<% if edit_mode %>
|
||||
<% homework.homework_tests.each_with_index do |homework_test,i|%>
|
||||
<% homework.homework_tests.each do |homework_test|%>
|
||||
<div>
|
||||
<li>
|
||||
<label class="label02"> 测试输入: </label>
|
||||
<input type="text" class="fl h26 w186 mb10" name="input[<%= i%>]" value="<%= homework_test.input%>"/>
|
||||
<input type="text" class="fl h26 w186 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/>
|
||||
</li>
|
||||
<li >
|
||||
<label class=" fl f14 ml10"> 输出: </label>
|
||||
<input type="text" class="fl h26 w186 mb10" name="output[<%= i%>]" value="<%= homework_test.output%>"/>
|
||||
<input type="text" class="fl h26 w186 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
|
||||
|
|
Loading…
Reference in New Issue