diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 3555a0b0c..99b21d8cc 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -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