增加部分默认参数的设置
This commit is contained in:
parent
650d0c8cb5
commit
dafc128f34
|
@ -341,7 +341,7 @@ class UsersController < ApplicationController
|
|||
homework.end_time = params[:homework_common][:end_time]
|
||||
homework.publish_time = Time.now
|
||||
homework.homework_type = 1
|
||||
homework.late_penalty = 0
|
||||
homework.late_penalty = 2
|
||||
homework.user_id = User.current.id
|
||||
homework.course_id = params[:course_id]
|
||||
|
||||
|
@ -355,7 +355,7 @@ class UsersController < ApplicationController
|
|||
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 = 0
|
||||
homework_detail_manual.absence_penalty = 2
|
||||
homework.homework_detail_manual = homework_detail_manual
|
||||
|
||||
if homework.save
|
||||
|
|
Loading…
Reference in New Issue