|
|
|
@ -117,7 +117,7 @@ class CoursesService
|
|
|
|
|
scope = @course ? @course.news.course_visible(current_user) : News.course_visible(current_user)
|
|
|
|
|
news = []
|
|
|
|
|
scope.each do |n|
|
|
|
|
|
news << {:title => n.title,:author_name => n.author.name,:author_id => n.author.id, :description => n.description,:created_on => format_time(n.created_on),:comments_count => n.comments_count}
|
|
|
|
|
news << {:id => n.id,:title => n.title,:author_name => n.author.name,:author_id => n.author.id, :description => n.description,:created_on => format_time(n.created_on),:comments_count => n.comments_count}
|
|
|
|
|
end
|
|
|
|
|
news
|
|
|
|
|
end
|
|
|
|
|