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/users/courses/shared/_course.json.jbuilder

16 lines
594 B

6 years ago
json.id course.id
json.name course.name
5 years ago
# json.members_count course.members_count
json.members_count course.course_members_count
# json.homework_commons_count course.homework_commons_count
json.homework_commons_count get_tasks_count course
6 years ago
json.attachments_count course.attachments.count
json.first_category_url module_url(course.course_modules.where(hidden: 0).order(position: :desc).first, course)
6 years ago
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