Merge branch 'cxt_course' into develop

This commit is contained in:
cxt 2016-04-15 17:20:55 +08:00
commit b07c3947d6
3 changed files with 9 additions and 7 deletions

View File

@ -890,7 +890,7 @@ class StudentWorkController < ApplicationController
@homework.save
end
unless homework_detail_manual.absence_penalty.to_s == params[:absence_penalty].to_s
if params[:absence_penalty] && homework_detail_manual.absence_penalty.to_s != params[:absence_penalty].to_s
homework_detail_manual.absence_penalty = params[:absence_penalty]
if homework_detail_manual.comment_status == 3 #当前作业处于匿评结束状态,修改缺评扣分才会修改每个作品应扣分的值
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"

View File

@ -4,10 +4,12 @@
<span class="f14 fontGrey3 mr10">迟交扣分</span>
<input type="text" name="late_penalty" id="late_penalty_num" placeholder="请输入0-50数值" class=" markInput" value="<%= homework.late_penalty%>" onkeyup="check_late_penalty('late_penalty_num')"/>
</div>
<% if homework.anonymous_comment == 0 %>
<div>
<span class="f14 fontGrey3 mr10">缺评扣分</span>
<input type="text" name="absence_penalty" id="absence_penalty_num" placeholder="请输入0-50数值" class="markInput" value="<%= homework.homework_detail_manual.absence_penalty%>" onkeyup="check_late_penalty('absence_penalty_num')"/>
</div>
<% end %>
<% if homework.homework_type == 2%>
<div>

View File

@ -114,7 +114,7 @@ function regex_course_class_period()
}
else
{
$("#course_class_period_notice").html("学时总数必须为");
$("#course_class_period_notice").html("学时总数必须为正整数");
$("#course_class_period_notice").show();
return false;
}