|
|
@ -326,7 +326,7 @@ class GraduationTasksController < ApplicationController
|
|
|
|
tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if
|
|
|
|
tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if
|
|
|
|
@course.end_date.present? && params[:end_time] > @course.end_date.end_of_day
|
|
|
|
@course.end_date.present? && params[:end_time] > @course.end_date.end_of_day
|
|
|
|
|
|
|
|
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
# ActiveRecord::Base.transaction do
|
|
|
|
begin
|
|
|
|
begin
|
|
|
|
tasks = @course.graduation_tasks.where(id: params[:task_ids], status: 0).
|
|
|
|
tasks = @course.graduation_tasks.where(id: params[:task_ids], status: 0).
|
|
|
|
where("publish_time is null or publish_time > '#{Time.now}'")
|
|
|
|
where("publish_time is null or publish_time > '#{Time.now}'")
|
|
|
@ -350,7 +350,7 @@ class GraduationTasksController < ApplicationController
|
|
|
|
tip_exception(e.message)
|
|
|
|
tip_exception(e.message)
|
|
|
|
raise ActiveRecord::Rollback
|
|
|
|
raise ActiveRecord::Rollback
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def end_task
|
|
|
|
def end_task
|
|
|
|