From ed674d960c2a0fa934a5b9d6e43a627495e91eaf Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 13 Mar 2015 11:55:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=8A=A8=E6=80=81=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index c9ea1ca80..2cfbc550b 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -381,7 +381,7 @@ class CoursesService end latest_bid_message = messages.first unless latest_bid_message.nil? - latest_course_dynamics << {:type => 4,:time => latest_bid_message.created_on,:message => '最近更新了作业'}#l(:label_recently_updated_message,:locale => current_user.language.nil? ? 'zh':current_user.language)} + latest_course_dynamics << {:type => 4,:time => latest_bid_message.created_on,:message => l(:label_recently_updated_message,:locale => current_user.language.nil? ? 'zh':current_user.language)} end #每个作业中学生最后提交的作业 homeworks = [] @@ -396,7 +396,7 @@ class CoursesService end latest_homework_attach = homeworks.first unless latest_homework_attach.nil? - latest_course_dynamics << {:type => 4,:time => latest_homework_attach.updated_at,:message => '最近更新了作业'}#l(:label_recently_updated_homework,:locale => current_user.language.nil? ? 'zh':current_user.language)} + latest_course_dynamics << {:type => 4,:time => latest_homework_attach.updated_at,:message => l(:label_recently_updated_homework,:locale => current_user.language.nil? ? 'zh':current_user.language)} end latest_course_dynamics.sort!{|order,newer| newer[:time] <=> order[:time]} latest_course_dynamic = latest_course_dynamics.first