From 60838460fc245ed81793c4b6dc07d7fa75945f96 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 7 Apr 2015 16:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=9A=84=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=B9=9F=E8=A6=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 7c1f14104..73cf4452d 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -373,6 +373,16 @@ class CoursesService unless latest_bid.nil? latest_course_dynamics << {:type => 4,:time => latest_bid.updated_on,:message => l(:label_recently_updated_homework,:locale => get_user_language(current_user))} end + + # Time 2015-04-07 14:58:30 + # Author lizanle + # Description 添加课程创建动态 + if(User.find_by_id(CourseInfos.find_by_course_id(course.id).try(:user_id))) + create_user_name = User.find_by_id(CourseInfos.find_by_course_id(course.id).user_id).realname + latest_course_dynamics << {:type => 5,:time => course.created_at,:message =>l(:label_recently,:locale => get_user_language(current_user)) << create_user_name << l(:label_creat,:locale => get_user_language(current_user))} + end + + #每个作业中的最新留言 messages = [] course.homeworks.each do |bid|