1.新建、修改作业时点击是否启用匿评选择框js的修改
2.修改匿评分配数量提示有歧义的问题
This commit is contained in:
sw 2014-12-10 10:54:21 +08:00
parent f977a622a2
commit 410d61022b
4 changed files with 20 additions and 15 deletions

View File

@ -43,13 +43,13 @@
<p style="display: none">
<%= f.select :proportion, proportion_option %>
</p>
<p>
<p id="open_anonymous_evaluation_p">
<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %>
<span>未开启匿评作业将直接进入众评点赞阶段</span>
<span id='open_anonymous_evaluation_span' style="display: none">未开启匿评作业将直接进入众评点赞阶段</span>
</p>
<p id="evaluation_num_p">
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%>
<span id="bid_evaluation_num_span">匿评分配数量不宜太大,否则会影响开启匿评速度</span>
<span id="bid_evaluation_num_span">即每份作业被允许匿评的人数</span>
</p>
<p>
<%= hidden_field_tag 'course_id', @course.id %>

View File

@ -91,16 +91,19 @@
}
});
});
$(function(){
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
{
$("#evaluation_num_p").show();
}
else
{
$("#evaluation_num_p").hide();
}
$("#bid_open_anonymous_evaluation").click(function(){
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
{
$("#evaluation_num_p").slideDown();
$("#open_anonymous_evaluation_span").slideUp();
}
else
{
$("#evaluation_num_p").slideUp();
$("#open_anonymous_evaluation_span").slideDown();
}
});
});
function submitHomework(id)

View File

@ -48,13 +48,13 @@
<p style="display: none">
<%= f.select :proportion, proportion_option %>
</p>
<p>
<p id="open_anonymous_evaluation_p">
<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %>
<span>未开启匿评作业将直接进入众评点赞阶段</span>
<span id='open_anonymous_evaluation_span' style="display: none">未开启匿评作业将直接进入众评点赞阶段</span>
</p>
<p id="evaluation_num_p">
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%>
<span id="bid_evaluation_num_span">匿评分配数量不宜太大,否则会影响开启匿评速度</span>
<span id="bid_evaluation_num_span">即每份作业被允许匿评的人数</span>
</p>
<p>
<%= hidden_field_tag 'course_id', @course.id %>

View File

@ -84,10 +84,12 @@
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
{
$("#evaluation_num_p").slideDown();
$("#open_anonymous_evaluation_span").slideUp();
}
else
{
$("#evaluation_num_p").slideUp();
$("#open_anonymous_evaluation_span").slideDown();
}
});
});