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.
21 lines
575 B
21 lines
575 B
6 years ago
|
json.username @user.full_name
|
||
|
json.login @user.login
|
||
|
json.user_id @user.id
|
||
|
json.image_url url_to_avatar(@user)
|
||
|
json.admin @user.admin?
|
||
|
json.is_teacher @user.user_extension&.teacher?
|
||
|
json.tidding_count 0
|
||
|
json.user_phone_binded @user.phone.present?
|
||
|
if @course
|
||
|
json.course_identity @course_identity
|
||
|
json.course_name @course.name
|
||
|
json.course_public @course.is_public
|
||
|
if params[:group_info]
|
||
|
json.group_info @course.teacher_group(@user.id) if @course_identity < Course::STUDENT
|
||
|
end
|
||
|
end
|
||
|
|
||
|
if params[:school]
|
||
|
json.user_school @user.school_name
|
||
|
end
|