当天截止的测验需要发布截止消息
This commit is contained in:
parent
06122dab1d
commit
e2f5dcc3f9
|
@ -3,6 +3,7 @@
|
|||
namespace :exercise_deadline_warn do
|
||||
desc "exercise deadline warn"
|
||||
task :deadline_warn => :environment do
|
||||
#exercise_status 1 未发布 2 已发布 3已截止
|
||||
exercises = Exercise.where("exercise_status = 2 and date_format(end_time,'%Y-%m-%d')= '#{Date.today}'") #截止日期都是当天 23.59分,所以年月日相等的一定是今晚会截止的测验
|
||||
exercises.each do |exercise|
|
||||
course = exercise.course
|
||||
|
|
Loading…
Reference in New Issue