diff --git a/app/services/update_homework_publish_setting_service.rb b/app/services/update_homework_publish_setting_service.rb index 86e348daf..0f61bcd75 100644 --- a/app/services/update_homework_publish_setting_service.rb +++ b/app/services/update_homework_publish_setting_service.rb @@ -76,7 +76,7 @@ class UpdateHomeworkPublishSettingService < ApplicationService # 实训作业截止时间已过也可修改截止时间,其他作业暂不支持修改 if (homework.homework_type == "practice" || homework.end_time > Time.now) && homework.unified_setting tip_exception("截止时间不能为空") if params[:end_time].blank? - tip_exception("截止时间必须晚于发布时间") if params[:end_time].to_time >= homework.publish_time + tip_exception("截止时间必须晚于发布时间") if params[:end_time].to_time <= homework.publish_time # tip_exception("截止时间不能早于当前时间") if params[:end_time].to_time <= Time.now tip_exception("截止时间不能晚于课堂结束时间(#{course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if course.end_date.present? && params[:end_time].to_time > course.end_date.end_of_day