新建作业时,作业截止时间为空

This commit is contained in:
sw 2015-08-29 11:12:18 +08:00
parent 00ab2bcbd4
commit 86e9ec068f
1 changed files with 1 additions and 1 deletions

View File

@ -352,7 +352,7 @@ class UsersController < ApplicationController
homework = HomeworkCommon.new
homework.name = params[:homework_common][:name]
homework.description = params[:homework_common][:description]
homework.end_time = params[:homework_common][:end_time]
homework.end_time = params[:homework_common][:end_time] || Time.now
homework.publish_time = Time.now
homework.homework_type = 1
homework.late_penalty = 2