You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/colleges/course_statistics.json.jbui...

11 lines
636 B

json.courses @courses do |course|
json.(course, :id, :name, :is_end, :evaluating_count)
json.teachers course.teacher_users.map(&:real_name).join('、')
json.student_count @student_count.fetch(course.id, 0)
json.shixun_work_count @shixun_work_count.fetch(course.id, 0)
json.attachment_count @attachment_count.fetch(course.id, 0)
json.message_count @message_count.fetch(course.id, 0)
json.other_work_count @exercise_count.fetch(course.id, 0) + @poll_count.fetch(course.id, 0) + @other_work_count.fetch(course.id, 0)
json.activity_time @active_time[course.id]&.strftime('%Y-%m-%d %H:%M')
end
json.course_count @course_count