diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 031a228ce..cb6c1505b 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -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|