diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 281ff7cf8..9dd9f69be 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -17,14 +17,14 @@ class HomeworkCommonController < ApplicationController def new @homework = HomeworkCommon.new @homework.safe_attributes = params[:homework_common] - @homework.late_penalty = 2 + @homework.late_penalty = 0 @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') @homework.publish_time = Time.now.strftime('%Y-%m-%d') #匿评作业相关属性 @homework_detail_manual = HomeworkDetailManual.new @homework_detail_manual.ta_proportion = 0.6 - @homework_detail_manual.absence_penalty = 2 + @homework_detail_manual.absence_penalty = 0 @homework_detail_manual.evaluation_num = 3 @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d') @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d') diff --git a/app/helpers/homework_common_helper.rb b/app/helpers/homework_common_helper.rb index 5399fd5bf..b9940f4be 100644 --- a/app/helpers/homework_common_helper.rb +++ b/app/helpers/homework_common_helper.rb @@ -3,7 +3,7 @@ module HomeworkCommonHelper #迟交扣分下拉框 def late_penalty_option type = [] - for i in (1..5) + for i in (0..5) option = [] option << i option << i @@ -29,7 +29,7 @@ module HomeworkCommonHelper #缺评扣分 def absence_penalty_option type = [] - i = 1 + i = 0 while i <= 5 option = [] option << i diff --git a/app/views/homework_common/_homework_common_form.html.erb b/app/views/homework_common/_homework_common_form.html.erb index ec6a1bbcc..e3ef0d237 100644 --- a/app/views/homework_common/_homework_common_form.html.erb +++ b/app/views/homework_common/_homework_common_form.html.erb @@ -45,7 +45,7 @@
基本规则设置(总分为100分)