diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 9fe29746e..a0735bf8a 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -390,7 +390,14 @@ class HomeworkCommonController < ApplicationController @homework_detail_manual.evaluation_end = params[:evaluation_end] end - @homework_detail_manual.evaluation_num = params[:evaluation_num] + evaluation_num = @homework_detail_manual.evaluation_num + if params[:evaluation_limit].to_i == 1 + @homework_detail_manual.evaluation_num = params[:evaluation_num] + @homework_detail_manual.absence_penalty = evaluation_num == -1 ? 5 : @homework_detail_manual.absence_penalty + else + @homework_detail_manual.evaluation_num = -1 + @homework_detail_manual.absence_penalty = 0 + end @homework_detail_manual.save @user_activity_id = params[:user_activity_id].to_i @hw_status = params[:hw_status].to_i diff --git a/app/views/homework_common/_set_evalutation_att.html.erb b/app/views/homework_common/_set_evalutation_att.html.erb index eff138305..61d1b983c 100644 --- a/app/views/homework_common/_set_evalutation_att.html.erb +++ b/app/views/homework_common/_set_evalutation_att.html.erb @@ -1,53 +1,84 @@ -
系统自动开启匿评的时间
+系统自动关闭匿评的时间
+作品供指定数量的学生评阅
+作品供全部的学生评阅
缺评扣分将被置零