diff --git a/app/views/bids/_homework_form.html.erb b/app/views/bids/_homework_form.html.erb index 12393c558..ffe0fc1b9 100644 --- a/app/views/bids/_homework_form.html.erb +++ b/app/views/bids/_homework_form.html.erb @@ -43,13 +43,13 @@

<%= f.select :proportion, proportion_option %>

-

+

<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %> - 未开启匿评作业将直接进入众评点赞阶段 +

<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%> - 匿评分配数量不宜太大,否则会影响开启匿评速度 + 即每份作业被允许匿评的人数

<%= hidden_field_tag 'course_id', @course.id %> diff --git a/app/views/bids/edit.html.erb b/app/views/bids/edit.html.erb index 17e805fce..ee2142dd5 100644 --- a/app/views/bids/edit.html.erb +++ b/app/views/bids/edit.html.erb @@ -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) diff --git a/app/views/courses/_homework_form.html.erb b/app/views/courses/_homework_form.html.erb index 2d20ecf07..7e09e84fc 100644 --- a/app/views/courses/_homework_form.html.erb +++ b/app/views/courses/_homework_form.html.erb @@ -48,13 +48,13 @@

<%= f.select :proportion, proportion_option %>

-

+

<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %> - 未开启匿评作业将直接进入众评点赞阶段 +

<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%> - 匿评分配数量不宜太大,否则会影响开启匿评速度 + 即每份作业被允许匿评的人数

<%= hidden_field_tag 'course_id', @course.id %> diff --git a/app/views/courses/new_homework.html.erb b/app/views/courses/new_homework.html.erb index e3121c6ad..2e0b35c6d 100644 --- a/app/views/courses/new_homework.html.erb +++ b/app/views/courses/new_homework.html.erb @@ -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(); } }); });