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 @@ 迟交扣分 -