diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index bab2cbf12..fa2ce04cf 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -156,7 +156,6 @@ class HomeworkCommonController < ApplicationController if @homework.homework_type == 2 @homework.homework_detail_programing ||= HomeworkDetailPrograming.new @homework_detail_programing = @homework.homework_detail_programing - @homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6 @homework_detail_programing.language = params[:language_type].to_i @homework.homework_tests.delete_all diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4796d0c0c..59a50a904 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -444,7 +444,7 @@ class UsersController < ApplicationController homework.end_time = params[:homework_common][:end_time] || Time.now homework.publish_time = Time.now homework.homework_type = params[:homework_type].to_i || 1 - homework.late_penalty = 2 + homework.late_penalty = 10 homework.user_id = User.current.id homework.course_id = params[:course_id] @@ -452,19 +452,19 @@ class UsersController < ApplicationController render_attachment_warning_if_needed(homework) homework_detail_manual = HomeworkDetailManual.new - homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6 + homework_detail_manual.ta_proportion = homework.homework_type == 1 ? 0.6 : 0.2 homework_detail_manual.comment_status = 1 homework_detail_manual.evaluation_start = Time.now homework_detail_manual.evaluation_end = Time.now homework_detail_manual.evaluation_num = params[:evaluation_num] || 3 - homework_detail_manual.absence_penalty = 2 + homework_detail_manual.absence_penalty = 5 homework.homework_detail_manual = homework_detail_manual #编程作业相关属性 if homework.homework_type == 2 homework_detail_programing = HomeworkDetailPrograming.new homework.homework_detail_programing = homework_detail_programing - homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6 + homework_detail_programing.ta_proportion = 0.5 homework_detail_programing.language = params[:language_type].to_i inputs = params[:program][:input]