|
|
|
@ -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
|
|
|
|
|