diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index a09db6308..94ced56fd 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -532,7 +532,7 @@ class HomeworkCommonsController < ApplicationController # 如果该发布规则 没有已发布的分班则需判断发布时间 tip_exception("发布时间不能早于等于当前时间") if setting[:publish_time] <= strf_time(Time.now) && group_settings.group_published.count == 0 - tip_exception("截止时间不能早于等于当前时间") if setting[:end_time] <= strf_time(Time.now) + tip_exception("截止时间不能早于等于当前时间") if setting[:end_time] <= strf_time(Time.now) && group_settings.none_end.count > 0 tip_exception("截止时间不能早于发布时间") if setting[:publish_time] > setting[:end_time] tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if @course.end_date.present? && setting[:end_time] > strf_time(@course.end_date.end_of_day)