课程动态数计算报错
This commit is contained in:
parent
3dce6ec763
commit
9f552365c2
|
@ -570,11 +570,6 @@ module CoursesHelper
|
|||
end
|
||||
end
|
||||
|
||||
#message_count
|
||||
#Board.where(course_id: @course_ids).each do |board|
|
||||
# activities[board.course_id]+=board.messages.where("updated_on>?", date_from).count
|
||||
#end
|
||||
|
||||
#message_count
|
||||
Board.where(course_id: @course_ids).each do |board|
|
||||
countmessage = 0
|
||||
|
@ -594,24 +589,15 @@ module CoursesHelper
|
|||
end
|
||||
end
|
||||
|
||||
#feedback_count 留言目前有问题留待下一步处理
|
||||
#JournalsForMessage.where(jour_id: @course_ids, jour_type: Course).each do |jourformess|
|
||||
# activities[jourformess.jour_id]+=1
|
||||
#end
|
||||
|
||||
#homework_count
|
||||
HomeworkForCourse.where(course_id: @course_ids).each do |homework|
|
||||
countbid=0
|
||||
# @bid_ids<<homework.bid_id
|
||||
Bid.where(id: homework.bid_id).where("created_on>?",date_from).each do |bid|
|
||||
countbid+=1
|
||||
end
|
||||
activities[homework.course_id]+=countbid
|
||||
end
|
||||
|
||||
#@bid_ids.each do |bid_id|
|
||||
# activities[] +=Bid.where(id: bid_id ).where("created_on>?",date_from).count
|
||||
#end
|
||||
# HomeworkForCourse.where(course_id: @course_ids).each do |homework|
|
||||
# countbid=0
|
||||
# # @bid_ids<<homework.bid_id
|
||||
# Bid.where(id: homework.bid_id).where("created_on>?",date_from).each do |bid|
|
||||
# countbid+=1
|
||||
# end
|
||||
# activities[homework.course_id]+=countbid
|
||||
# end
|
||||
|
||||
#poll_count
|
||||
# 动态目前只统计发布的问卷,关闭的问卷不在动态内显示
|
||||
|
|
Loading…
Reference in New Issue