From 2557e9063de3ab9f993e58d58ea97392115c9d13 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Tue, 29 Sep 2015 10:25:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=80=E5=90=AF=E5=8C=BF?= =?UTF-8?q?=E8=AF=84=E4=B8=AD=E7=9A=84send=5Fmessage=5Fanonymous=5Fcomment?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=88=90=E5=AF=B9=E5=BA=94=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/homework_evaluation.rake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/tasks/homework_evaluation.rake b/lib/tasks/homework_evaluation.rake index c8f9408a0..b061af328 100644 --- a/lib/tasks/homework_evaluation.rake +++ b/lib/tasks/homework_evaluation.rake @@ -26,7 +26,11 @@ namespace :homework_evaluation do end homework_detail_manual.update_column('comment_status', 2) # 匿评开启消息邮件通知,# 所有人 - send_message_anonymous_comment(homework_common, 2) + #send_message_anonymous_comment(homework_common, 2) + course = homework_common.course + course.members.each do |m| + homework_common.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2) + end # 邮件通知 Mailer.send_mail_anonymous_comment_close(homework_common).deliver else