增加部分默认参数的设置

This commit is contained in:
sw 2015-08-26 17:44:03 +08:00
parent 650d0c8cb5
commit dafc128f34
1 changed files with 2 additions and 2 deletions

View File

@ -341,7 +341,7 @@ class UsersController < ApplicationController
homework.end_time = params[:homework_common][:end_time] homework.end_time = params[:homework_common][:end_time]
homework.publish_time = Time.now homework.publish_time = Time.now
homework.homework_type = 1 homework.homework_type = 1
homework.late_penalty = 0 homework.late_penalty = 2
homework.user_id = User.current.id homework.user_id = User.current.id
homework.course_id = params[:course_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_start = Time.now
homework_detail_manual.evaluation_end = Time.now homework_detail_manual.evaluation_end = Time.now
homework_detail_manual.evaluation_num = params[:evaluation_num] || 3 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 homework.homework_detail_manual = homework_detail_manual
if homework.save if homework.save