#1275 修正课程列表中的动态数
This commit is contained in:
parent
2e3bdf1179
commit
1abcd2a43e
|
@ -503,20 +503,8 @@ module CoursesHelper
|
||||||
activities[news.course_id]+=1
|
activities[news.course_id]+=1
|
||||||
end
|
end
|
||||||
|
|
||||||
#feedbackc_count
|
# 动态数 + 1 ( 某某创建了该课程 )
|
||||||
JournalsForMessage.where(jour_id: @course_ids, jour_type: Course).each do |jourformess|
|
activities.each_pair { |key, value| activities[key] = value + 1 }
|
||||||
activities[jourformess.jour_id]+=1
|
|
||||||
end
|
|
||||||
|
|
||||||
#activities!=0
|
|
||||||
i=0;
|
|
||||||
courses.each do |course|
|
|
||||||
id=course.id
|
|
||||||
if activities[id]==0
|
|
||||||
activities[id]=1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return activities
|
return activities
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue