json.id course.id json.name course.name json.members_count course.members_count json.homework_commons_count course.homework_commons_count json.attachments_count course.attachments.count json.first_category_url module_url(course.course_modules.where(hidden: 0).order(position: :desc).first, course) json.is_public course.is_public json.can_visited observed_logged_user? || course.can_visited? json.teacher do json.partial! 'users/shared/real_user', user: course.teacher end