已存在的输入输出测试的name改为测试的id

This commit is contained in:
sw 2015-06-17 10:05:10 +08:00
parent 02d7215f6f
commit d23189b933
1 changed files with 3 additions and 3 deletions

View File

@ -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">&nbsp;测试输入:&nbsp;</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">&nbsp;输出:&nbsp;</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>