实训任务

This commit is contained in:
daiao 2017-03-22 14:58:27 +08:00
parent 5f2a9869f9
commit 38bfa7250e
1 changed files with 10 additions and 10 deletions

View File

@ -80,7 +80,6 @@
<label class="panel-form-label fl">测试集设置:</label>
<ul class="fl task-bg-grey">
<li class="clearfix">
<% if params[:action] == "edit" && @challenge.test_sets.count > 0 %>
<% @challenge.test_sets.each_with_index do |test, index| %>
<p class="clearfix">
@ -95,7 +94,6 @@
</p>
<input type="text" class="panel-form-width-670 panel-form-height-30 mb10" name="program[input][]" id="textarea_input_test" value="<%= test.input %>"/>
<input type="text" class="panel-form-width-670 panel-form-height-30" name="program[output][]" id="textarea_output_test" value="<%= test.output %>" />
<% end %>
<% else %>
<p class="clearfix">
@ -112,16 +110,18 @@
<li class="clearfix">
<label class=" panel-form-label fl"> 知识/技能点:</label>
<div class="fl task-bd-grey">
<% if params[:action] == "edit" && @challenge_tags.count > 0 %>
<% @challenge_tags.each do |tag| %>
<div class="task-tag tag-grey mb10 mr10 fl">
<button data-dismiss="alert" class="close fr mt3 ml5" type="button" onclick="close_tag(this)">×</button>
<%= tag.try(:name) %>
</div>
<% end %>
<% end %>
<button class="close fl mt3 mr10" type="button" onclick="$('#add_shixun_skill').slideToggle();" id="add_knowledge">+</button>
<div class="task-tag tag-grey mb10 mr10 fl undis" id="add_shixun_skill">
<button data-dismiss="alert" class="close fr mt3 ml5" type="button" onclick="$('#add_shixun_skill').slideToggle();">×</button>
<% if params[:action] == "edit" && @challenge_tags.count > 0 %>
<% @challenge_tags.each do |tag| %>
<input type="text" class="task-tag-input" onblur="add_tag();" placeholder="请输入知识/技能点" value="<%= tag.try(:name) %>" />
<% end %>
<% else %>
<input type="text" class="task-tag-input" onblur="add_tag();" placeholder="请输入知识/技能点" />
<% end %>
<input type="text" class="task-tag-input" onblur="add_tag();" placeholder="请输入知识/技能点" />
</div>
</div>
</li>
@ -267,7 +267,7 @@
}else if($("#challenge_score").val().trim()==""){
$("#new_shixun_score").show();
}else{
$('#new_challenge').submit();
$('#new_challenge').submit();
}
}