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/get_user_info.json.jbuilder

24 lines
748 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.user_identity @user.identity
6 years ago
json.tidding_count 0
json.user_phone_binded @user.phone.present?
json.profile_completed @user.profile_completed?
6 years ago
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
json.first_category_url module_url(@course.none_hidden_course_modules.first, @course)
6 years ago
end
if params[:school]
json.user_school @user.school_name
end