Merge branch 'dev_linda' into dev_huang
Conflicts: app/views/layouts/base_shixun.html.erb public/stylesheets/css/bigdata-common.css
This commit is contained in:
commit
ec9913ca45
2
Gemfile
2
Gemfile
|
|
@ -75,7 +75,7 @@ group :development, :test do
|
|||
gem 'pry-byebug'
|
||||
gem "test-unit", "~>3.0"
|
||||
end
|
||||
gem 'rspec-rails', '~> 3.0'
|
||||
# gem 'rspec-rails', '~> 3.0'
|
||||
gem 'factory_girl_rails'
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -81,11 +81,12 @@
|
|||
<li class="clearfix">
|
||||
<p class="clearfix">
|
||||
<span class="color-green fb fl" name="sample_inputs_label"></span>
|
||||
<input type="checkbox" class="fl ml5 mr5 mt8"><span class="fl mr5">锁定</span>
|
||||
<a href="javascript:void(0)" title="增加" class="sample_icon_add"><i class="fa fa-plus-circle color-grey font-16 ml10 fl mt7"></i></a>
|
||||
<a href="javascript:void(0)" title="删除" class="sample_icon_remove"><i class="fa fa-times-circle color-grey font-16 ml10 fl mt7"></i></a>
|
||||
</p>
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing mb10" name="sample[input][]" id="textarea_input_test" placeholder="样例输入" />
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing mb10" name="sample[output][]" id="textarea_output_test" placeholder="样例输出" />
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing mb10" name="sample[input][]" id="textarea_input_test" placeholder="输入" />
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing mb10" name="sample[output][]" id="textarea_output_test" placeholder="希望输出" />
|
||||
</li>
|
||||
</script>
|
||||
<script id="t:test-answer-list" type="text/html">
|
||||
|
|
@ -129,46 +130,49 @@
|
|||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl"><span class="c_red mr5">*</span>评测方式:</label>
|
||||
<%= select_tag :evaluation_way, options_for_select([["输出输出", 1], ["文件存在", 2]]), :name => 'challenge[evaluation_way]', :class => "ml5", :style => "height: 28px;" %>
|
||||
<%= select_tag :evaluation_way, options_for_select([["输出输出", 1], ["文件存在", 2]]), :name => 'challenge[evaluation_way]', :class => " fl", :style => "height: 40px; width:200px;" %>
|
||||
<span class="fl ml15 mt8">请选择自动检测学员是否完成本任务的评测标准</span>
|
||||
</li>
|
||||
|
||||
<li class="clearfix">
|
||||
<% if params[:action] == "edit" && @challenge.challenge_samples.count > 0 %>
|
||||
<label class="panel-form-label fl">样例设置:</label>
|
||||
<label class="panel-form-label fl">测试集设置:</label>
|
||||
<ul class="fl task-bg-grey panel-box-sizing" >
|
||||
<% @challenge.challenge_samples.each_with_index do |sample, index| %>
|
||||
<li class="clearfix">
|
||||
<p class="clearfix">
|
||||
<span class="color-green fb fl" name="sample_inputs_label">样例<%= index + 1 %></span>
|
||||
<span class="color-green fb fl" name="sample_inputs_label">组<%= index + 1 %></span>
|
||||
<input type="checkbox" class="fl ml5 mr5 mt8"><span class="fl mr5">锁定</span>
|
||||
<% if index == 0 %>
|
||||
<span class="color-grey fr" style="font-size:12px;">温馨提示:输入样例供学员参考。</span>
|
||||
<span class="color-grey fr" style="font-size:12px;">温馨提示:选中“锁定”,则对学员隐藏该条测试集,但在“提交评测”时也将被自动检测。</span>
|
||||
<% end %>
|
||||
<a href="javascript:void(0)" title="增加" class="sample_icon_add"><i class="fa fa-plus-circle color-grey font-16 ml10 fl mt7"></i></a>
|
||||
<% if index > 0 %>
|
||||
<a href="javascript:void(0)" title="删除" class="sample_icon_remove"><i class="fa fa-times-circle color-grey font-16 ml10 fl mt7"></i></a>
|
||||
<% end %>
|
||||
</p>
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing mb10" name="sample[input][]" id="textarea_sample_input_test" placeholder="样例输入" value="<%= sample.input %>" />
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing" name="sample[output][]" id="textarea_sample_output_test" placeholder="样例输出" value="<%= sample.output %>" />
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing mb10" name="sample[input][]" id="textarea_sample_input_test" placeholder="输入" value="<%= sample.input %>" />
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing" name="sample[output][]" id="textarea_sample_output_test" placeholder="希望输出" value="<%= sample.output %>" />
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<label class="panel-form-label fl">样例设置:</label>
|
||||
<label class="panel-form-label fl">测试集设置:</label>
|
||||
<ul class="fl task-bg-grey panel-box-sizing">
|
||||
<li class="clearfix">
|
||||
<p class="clearfix">
|
||||
<span class="color-green fb fl" name="sample_inputs_label">样例1</span>
|
||||
<span class="color-grey fr" style="font-size:12px;">温馨提示:输入样例供学员参考。</span>
|
||||
<span class="color-green fb fl" name="sample_inputs_label">组1</span>
|
||||
<span class="color-grey fr" style="font-size:12px;">温馨提示:选中“锁定”,则对学员隐藏该条测试集,但在“提交评测”时也将被自动检测。</span>
|
||||
<input type="checkbox" class="fl ml5 mr5 mt8"><span class="fl mr5">锁定</span>
|
||||
<a href="javascript:void(0)" title="增加" class="sample_icon_add"><i class="fa fa-plus-circle color-grey font-16 ml10 fl mt7"></i></a>
|
||||
</p>
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing mb10" name="sample[input][]" id="textarea_sample_input_test" placeholder="样例输入" />
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing mb10" name="sample[output][]" id="textarea_sample_output_test" placeholder="样例输出" />
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing mb10" name="sample[input][]" id="textarea_sample_input_test" placeholder="输入" />
|
||||
<input type="text" class="panel-form-width-100 panel-box-sizing mb10" name="sample[output][]" id="textarea_sample_output_test" placeholder="希望输出" />
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<li class="clearfix">
|
||||
<% if params[:action] == "edit" && @challenge.test_sets.count > 0 %>
|
||||
<label class="panel-form-label fl">测试集设置:</label>
|
||||
<ul class="fl task-bg-grey panel-box-sizing" >
|
||||
|
|
@ -184,8 +188,8 @@
|
|||
<a href="javascript:void(0);" title="删除" class="test_icon_remove"><i class="fa fa-times-circle color-grey font-16 ml10 fl mt7"></i></a>
|
||||
<% end %>
|
||||
</p>
|
||||
<!--<input type="text" class="panel-form-width-670 panel-form-height-30 mb10" name="program[input][]" id="textarea_input_test" value="<%#= test.input %>"/>-->
|
||||
<textarea class="panel-form-width-100 panel-box-sizing" id="textarea_output_test" name="program[output][]" placeholder="输入测试集内容" ><%= test.output %></textarea>
|
||||
<!--<input type="text" class="panel-form-width-670 panel-form-height-30 mb10" name="program[input][]" id="textarea_input_test" value="<%#= test.input %>"/> -->
|
||||
<textarea class="panel-form-width-100 panel-box-sizing" id="textarea_output_test" name="program[output][]" placeholder="输入测试集内容" ><%= test.output %></textarea>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
@ -199,11 +203,13 @@
|
|||
<a href="javascript:void(0);" title="增加" class="test_icon_add"><i class="fa fa-plus-circle color-grey font-16 ml10 fl mt7"></i></a>
|
||||
</p>
|
||||
<!-- <input type="text" class="panel-form-width-670 panel-form-height-30 mb10" name="program[input][]" id="textarea_input_test" placeholder="测试输入" />-->
|
||||
<textarea class="panel-form-width-100 panel-box-sizing " id="textarea_output_test" name="program[output][]" placeholder="输入用例内容" ></textarea>
|
||||
<textarea class="panel-form-width-100 panel-box-sizing " id="textarea_output_test" name="program[output][]" placeholder="输入用例内容" ></textarea>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl"> 知识/技能点:</label>
|
||||
<div class="fl task-bd-grey">
|
||||
|
|
@ -229,15 +235,16 @@
|
|||
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl"><span class="c_red mr5">*</span>难易度:</label>
|
||||
<label><%= radio_button_tag("challenge[difficulty]", 1, checked = (@challenge.difficulty ==1 ? true : false)) %>简单 </label>
|
||||
<label><%= radio_button_tag("challenge[difficulty]", 2, checked = (@challenge.difficulty ==2 ? true : false)) %>中等 </label>
|
||||
<label><%= radio_button_tag("challenge[difficulty]", 3, checked = (@challenge.difficulty ==3 ? true : false)) %>困难 </label>
|
||||
<span class="mt10 fl"><%= radio_button_tag("challenge[difficulty]", 1, checked = (@challenge.difficulty ==1 ? true : false)) %></span><span class="ml5 fl mt8 mr15">简单</span>
|
||||
<span class="mt10 fl"><%= radio_button_tag("challenge[difficulty]", 2, checked = (@challenge.difficulty ==2 ? true : false)) %></span><span class="ml5 fl mt8 mr15">中等</span>
|
||||
<span class="mt10 fl"><%= radio_button_tag("challenge[difficulty]", 3, checked = (@challenge.difficulty ==3 ? true : false)) %></span><span class="ml5 fl mt8 mr15">困难 </span>
|
||||
<span class="fl color-orange ml30 mt8"><i class="fa fa-exclamation-circle mr5"></i>请选择难易度并设定通过本关后,学员得到的经验值</span>
|
||||
</li>
|
||||
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl"><span class="c_red mr5">*</span>分值设定:</label>
|
||||
<label class="panel-form-label fl"><span class="c_red mr5">*</span>奖励经验值:</label>
|
||||
<%= f.text_field :score, :class => "panel-form-height-30 fl", :no_label => true, :style => "padding:5px;", :placeholder => "请输入分值(只能是数字)" %>
|
||||
<span class="fl ml5" style="line-height: 40px;">分</span>
|
||||
<span class="fl ml5" style="line-height: 40px;">(100~200 经验值)</span>
|
||||
<div class="clear"></div>
|
||||
<span style="display: none" class="c_red ml90" id="new_shixun_score">分值设定不能为空</span>
|
||||
</li>
|
||||
|
|
@ -291,7 +298,7 @@
|
|||
var outputs = document.getElementsByName("sample[output][]");
|
||||
var inputs_labels = document.getElementsByName("sample_inputs_label");
|
||||
for (var j = 0; j < inputs_labels.length; j++) {
|
||||
$(inputs_labels[j]).html("样例" + (j + 1));
|
||||
$(inputs_labels[j]).html("组" + (j + 1));
|
||||
}
|
||||
if (inputs.length == outputs.length) {
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
|
|
@ -305,7 +312,7 @@
|
|||
$(this).parent().parent('.clearfix').remove();
|
||||
var inputs_labels = document.getElementsByName("sample_inputs_label");
|
||||
for (var j = 0; j < inputs_labels.length; j++) {
|
||||
$(inputs_labels[j]).html("样例" + (j + 1));
|
||||
$(inputs_labels[j]).html("组" + (j + 1));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -61,16 +61,24 @@
|
|||
</div>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl">样例设置:</label>
|
||||
<label class="panel-form-label fl"><span class="c_red mr5">*</span>评测方式:</label>
|
||||
<div class="fl task-bg-grey panel-box-sizing panel-form-width-690">
|
||||
输入输出
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl">测试集:</label>
|
||||
<ul class="fl task-bg-grey panel-box-sizing panel-form-width-690">
|
||||
<% if @challenge_samples.count > 0 %>
|
||||
<% @challenge_samples.each_with_index do |sample, index| %>
|
||||
<li class="clearfix">
|
||||
<p class="clearfix">
|
||||
<span class="color-green fb">样例<%= index + 1 %></span>
|
||||
<span class="color-green fb">组<%= index + 1 %></span>
|
||||
<i class="fa fa-unlock-alt font-grey ml5" ></i>
|
||||
<i class="fa fa-lock font-grey ml5" ></i>
|
||||
</p>
|
||||
<div class="clearfix"><span class="fl fb">样例输入:</span><p class="fl"><%= sample.input %></p></div>
|
||||
<div class="clearfix"><span class="fl fb">样例输出:</span><p class="fl"><%= sample.output %></p></div>
|
||||
<div class="clearfix"><span class="fl fb">输入:</span><p class="fl"><%= sample.input %></p></div>
|
||||
<div class="clearfix"><span class="fl fb">希望输出:</span><p class="fl"><%= sample.output %></p></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
|
@ -95,6 +103,12 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="clearfix challenge_bottom">
|
||||
<label class="panel-form-label fl">评测脚本:</label>
|
||||
<div class="fl task-bg-grey panel-box-sizing panel-form-width-690" id="wordsView" style="width: 90%">
|
||||
自动评测脚本
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<% unless @challenge_tags.blank? %>
|
||||
<label class="panel-form-label fl"> 知识/技能点:</label>
|
||||
|
|
@ -113,7 +127,13 @@
|
|||
<div id="hidden_tpm_answer_show" class="undis"><%= @challenge.answer.blank? ? "无" : (@challenge.answer) %></div>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl"><span class="c_red mr5">*</span>分值设定:</label>
|
||||
<label class="panel-form-label fl">难易度:</label>
|
||||
<div class="fl task-bg-grey panel-box-sizing panel-form-width-690">
|
||||
简单
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl"><span class="c_red mr5">*</span>奖励经验值:</label>
|
||||
<div class="fl task-bg-grey panel-box-sizing panel-form-width-690">
|
||||
<%= @challenge.score %>分
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/bigdata-common','css/bigdata-public','css/common', 'css/taskstyle', 'css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel', 'css/font-awesome' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common', 'css/bigdata-common','css/bigdata-public', 'css/taskstyle', 'css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel', 'css/font-awesome' %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ a:hover.link-color-grey02{ color:red;}
|
|||
/*按钮*/
|
||||
a.task-btn{display: inline-block;border:none; padding:0 35px;color: #666;background: #e1e1e1; text-align:center;font-size: 12px; height: 35px;line-height: 35px; border-radius:3px;}
|
||||
a:hover.task-btn {background: #c3c3c3; }
|
||||
a.task-btn-green{background: #29bd8b; color: #fff !important;}
|
||||
a.task-btn-green{background: #29bd8b; color: #fff!important;}
|
||||
a:hover.task-btn-green{background: #19b17e;}
|
||||
a.task-btn-orange{ background:#fc8675; color:#fff !important;}
|
||||
a:hover.task-btn-orange{ background:#e27869;}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
/************新版公共****************/
|
||||
a:link,a:visited{text-decoration:none;color:#898989;}
|
||||
a:hover {color:#29bd8b;}
|
||||
body{ font-size:14px; line-height:2.0;}
|
||||
|
||||
.task-container{ min-width:1300px; margin:0 auto; background: #f5f9fc; position: relative;}
|
||||
|
|
@ -35,8 +33,8 @@ a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:15px; margin-top:
|
|||
.content-row{ padding:15px; }
|
||||
.content-info{ width:49.5%; min-width:250px;}
|
||||
.content-editor{ width:49.3%; min-width:250px; margin-left:15px; }
|
||||
.panel-header{ border-bottom:1px solid #515151; padding:5px 15px; color:#898989;}
|
||||
.panel-header-border{ border:1px solid #eee; padding:10px 15px; border-bottom:none;}
|
||||
.panel-header{ border-bottom:1px solid #eee; padding:5px 15px; color:#898989;}
|
||||
.panel-header-border{ border:1px solid #eee; padding:10px 15px; border-bottom:none; }
|
||||
/* tab */
|
||||
.tab_content{ width: 100%; margin: 0 auto; background:#fff; }
|
||||
#tab_nav {height:40px;background: #eff0f4; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue