编辑挂起状态的班级作业,保存报错

This commit is contained in:
cxt 2017-02-27 14:50:13 +08:00
parent 6329578f9b
commit 66d6eab161
1 changed files with 2 additions and 2 deletions

View File

@ -105,8 +105,8 @@ class HomeworkCommonController < ApplicationController
else
@homework.publish_time = params[:homework_common][:publish_time]
end
param_end_time = Time.parse(params[:homework_common][:end_time])
homework_end_time = @homework.end_time ? @homework.end_time : ''
param_end_time = Time.parse(params[:homework_common][:end_time]).to_s
homework_end_time = @homework.end_time ? @homework.end_time.to_s : ''
if homework_end_time != param_end_time
if homework_end_time > param_end_time
@homework.student_works.where("work_status = 1").each do |st|