diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 9597a35cf..424ddd71f 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -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(",") + ")" diff --git a/app/views/student_work/_set_score_rule_detail.html.erb b/app/views/student_work/_set_score_rule_detail.html.erb index c8451e478..28ca9e785 100644 --- a/app/views/student_work/_set_score_rule_detail.html.erb +++ b/app/views/student_work/_set_score_rule_detail.html.erb @@ -4,10 +4,12 @@ 迟交扣分 -
- 缺评扣分 - -
+ <% if homework.anonymous_comment == 0 %> +
+ 缺评扣分 + +
+ <% end %> <% if homework.homework_type == 2%>
diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 0b39a3929..46b8b0e54 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -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; } @@ -1431,4 +1431,4 @@ function submit_course_feedback() { function show_more_tool(){ $('#navContentCourse').css('display', 'block'); -} \ No newline at end of file +}