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