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

14 lines
525 B

6 years ago
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.not(module_type: "activity").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