发布作业时默认教师优先、迟交扣分为0、缺评扣分为0

This commit is contained in:
cxt 2016-11-04 18:54:51 +08:00
parent 94284e72a2
commit f921c8cccc
1 changed files with 2 additions and 2 deletions

View File

@ -1055,7 +1055,7 @@ class UsersController < ApplicationController
end
homework.anonymous_comment = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment].to_i : 1
homework.homework_type = params[:homework_type].to_i || 1
homework.late_penalty = 10
homework.late_penalty = 0
homework.teacher_priority = 1
homework.user_id = User.current.id
homework.course_id = params[:course_id]
@ -1077,7 +1077,7 @@ class UsersController < ApplicationController
homework_detail_manual.evaluation_start = params[:evaluation_start].blank? ? homework.end_time + 7 : params[:evaluation_start]
homework_detail_manual.evaluation_end = params[:evaluation_end].blank? ? homework_detail_manual.evaluation_start + 7 : params[:evaluation_end]
homework_detail_manual.evaluation_num = params[:evaluation_num] || 3
homework_detail_manual.absence_penalty = 5
homework_detail_manual.absence_penalty = 0
homework.homework_detail_manual = homework_detail_manual
#编程作业相关属性