学校的课堂统计bug

dev_tj
cxt 5 years ago
parent 42c4a4f953
commit dc3a6026c7

@ -105,7 +105,7 @@ class CollegesController < ApplicationController
@courses = paginate courses
course_ids = @courses.map(&:id)
@student_count = StudentsForCourse.where(course_id: course_ids).group(:course_id).count
@student_count = CourseMember.where(course_id: course_ids, role: 4).group(:course_id).count
@shixun_work_count = HomeworkCommon.where(homework_type: 4, course_id: course_ids).group(:course_id).count
@attachment_count = Attachment.where(container_id: course_ids, container_type: 'Course').group(:container_id).count
@message_count = Message.joins(:board).where(boards: { parent_id: 0, course_id: course_ids }).group('boards.course_id').count

Loading…
Cancel
Save