移植新版实训关卡按测试集给分同步到旧版

dev_local
杨树明 6 years ago
parent 0bbcacd48c
commit c1c45d642e

@ -134,7 +134,7 @@
<input type="text" class="input-100-45 greyInput" autocomplete="off" id="shixun_file_standard_picture_path"
name="challenge[expect_picture_path]" value="<%= @challenge.expect_picture_path %>"
placeholder ="请选择版本库中存储了标准答案代码输出文件的路径。例src/step1/expectedimages"/>
<p class="color-grey-9 mt15">
<p class="color-grey-9 mt15 ">
该路径下的文件将在学员评测本关任务时,作为参考答案显示在查看效果页,供学员参考任务输出结果为文件时请指定该路径,并注意与程序文件所在文件夹分开
</p>
</div>
@ -161,12 +161,13 @@
<div class="edu-back-white mb10 clearfix">
<div class="padding40-20">
<p class="color-grey-6 font-16">测试集和系统评分规则</p>
<li class="clearfix">
<label class="panel-form-label fl">得分规范:</label>
<div class="radioStyle ml10">
<input type="radio" name="specification" value="All_tests" id="All_tests" class="ml-3 mr5 magic-radio" onchange="hideSystem_score_percentage()"/>
<label class="mt3" for="All_tests">通过全部测试集
<label class="mt3 maxwidth600" for="All_tests">通过全部测试集
<span class="color979797">(学员评测,仅当所有测试集都正确时,才获得一次性奖励)</span>
</label>
</div>
@ -178,7 +179,7 @@
<label class="panel-form-label fl transparent">得分规范:</label>
<div class="fl ml10">
<input type="radio" name="specification" value="Partial_test" id="Partial_test" class="ml5 mr5 magic-radio" onchange="showSystem_score_percentage()"/>
<label class="mt3" for="Partial_test">通过部分测试集
<label class="mt3 maxwidth600" for="Partial_test">通过部分测试集
<span class="color979797">(学员评测,当至少有一组测试集正确时,即可获得其对应比例的奖励)</span>
</label>
</div>

@ -78,7 +78,48 @@
</div>
</div>
<div class="edu-back-white mb10 clearfix padding40-20">
<p class="color-grey-6 font-16">测试集设置</p>
<p class="color-grey-6 font-16">测试集和系统评分规则</p>
<li class="clearfix">
<label class="panel-form-label fl">得分规范:</label>
<div class="radioStyle ml10">
<input type="radio" name="specification" value="All_tests" id="All_tests" disabled class="ml-3 mr5 magic-radio" onchange="hideSystem_score_percentage()"/>
<label class="mt3 maxwidth600" for="All_tests">通过全部测试集
<span class="color979797">(学员评测,仅当所有测试集都正确时,才获得一次性奖励)</span>
</label>
</div>
</li>
<li class="clearfix">
<label class="panel-form-label fl transparent">得分规范:</label>
<div class="fl ml10">
<input type="radio" name="specification" value="Partial_test" id="Partial_test" disabled class="ml5 mr5 magic-radio" onchange="showSystem_score_percentage()"/>
<label class="mt3 maxwidth600" for="Partial_test">通过部分测试集
<span class="color979797">(学员评测,当至少有一组测试集正确时,即可获得其对应比例的奖励)</span>
</label>
</div>
</li>
<li class="clearfix" id="System_score_percentage">
<label class="panel-form-label fl">系统评分占比:</label>
<span class="fl mr20 ml10">
<input type="radio" name="Proportion" value="Equal_proportion" disabled id="Equal_proportion" class="ml5 mr5 magic-radio"/>
<label class="mt3" for="Equal_proportion">均分比例</label>
</span>
<span class="fl mr20">
<input type="radio" name="Proportion" value="Custom_ratio" disabled id="Custom_ratio" class="ml5 mr5 magic-radio"/>
<label class="mt3" for="Custom_ratio">自定义比例</label>
</span>
</li>
<div class="df">
<div class="flex1 mr20">
<div class="test_array_item mb15">
@ -86,10 +127,17 @@
<% @test_sets.each_with_index do |test, index| %>
<p class="clearfix pr mb20 mt20">
<span class="fl mt5 mr10 color-orange">*</span>
<span class="color-blue font-16 fl" name="sample_inputs_label">组<%= index+1 %></span>
<span class="fl ml20 color-grey-6">
<span class="color-blue font-16 fl mr20" name="sample_inputs_label">组<%= index+1 %></span>
<span class="fl color-grey-6 width90px mt3" name="percentagenumbox">
<input class="fl martopf4 width44pxinline" disabled name="percentagenum">
<span class="mr15 wid10px">%</span>
</span>
<span class="fl color-grey-6">
<input type="checkbox" name="test_set[lock][]" <%= test.is_public? ? '' : 'checked' %> disabled class="magic-checkbox" id="hide-<%= index %>"/>
<label for="hide-<%= index %>" style="top:2px">隐藏</label>
<label for="hide-<%= index %>" style="top:4px">隐藏</label>
</span>
</p>
<div class="clearfix show_content_grey mb20">
@ -112,3 +160,18 @@
<div style="width: 57px;"></div>
</div>
</div>
<script>
$(function(){
//填写百分比初始化
$("#All_tests").attr('checked', 'checked');
if($("#All_tests").is(":checked")){
$("#System_score_percentage").hide() //控制系统评分占比的显示
}
var percentagenumbox = document.getElementsByName("percentagenumbox"); //控制获取所有的input 的显示
var percentagelist = document.getElementsByName("percentagenum"); //获取所有的input 百分比框
})
</script>

@ -1067,3 +1067,7 @@ html>body #ajax-indicator { position: fixed; }
display: inline-block;
margin-left: 10px;
}
.maxwidth600{
max-width: 600px;
}
Loading…
Cancel
Save