parent
394f4eb2fe
commit
4000eafe94
@ -1,18 +1,15 @@
|
|||||||
json.courses do
|
json.courses @courses do |course|
|
||||||
json.array! @courses do |course|
|
|
||||||
json.id course.id
|
json.id course.id
|
||||||
json.name course.name
|
json.name course.name
|
||||||
json.avatar_url url_to_avatar(course.teacher)
|
json.avatar_url url_to_avatar(course.teacher)
|
||||||
json.creator course.teacher.real_name
|
json.creator course.teacher.real_name
|
||||||
json.school course.teacher.school_name
|
json.school course.school&.name
|
||||||
json.technical_title course.teacher.user_extension.technical_title
|
json.technical_title course.teacher.identity
|
||||||
json.course_members_count course.course_members_count
|
json.course_members_count course.course_members_count
|
||||||
json.tasks_count get_tasks_count course
|
json.tasks_count get_tasks_count course
|
||||||
json.visits course.visits
|
json.visits course.visits
|
||||||
json.is_public course.is_public
|
json.is_public course.is_public
|
||||||
json.is_accessible course.is_public == 1 || @user.course_identity(course) < Course::NORMAL
|
json.is_accessible course.is_public == 1 || @user.course_identity(course) < Course::NORMAL
|
||||||
json.is_end course.is_end
|
json.is_end course.is_end
|
||||||
json.first_category_url module_url(course.course_modules.not_hidden.first, course)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
json.courses_count @courses_count
|
json.courses_count @courses_count
|
||||||
|
Loading…
Reference in new issue