|
|
|
@ -323,12 +323,7 @@ class User < ApplicationRecord
|
|
|
|
|
elsif business?
|
|
|
|
|
Course::BUSINESS
|
|
|
|
|
else
|
|
|
|
|
role =
|
|
|
|
|
if course.course_members.loaded?
|
|
|
|
|
course.course_members.find{|member| member.user_id == id && member.is_active == 1}&.role
|
|
|
|
|
else
|
|
|
|
|
course.course_members.find_by(user_id: id, is_active: 1)&.role
|
|
|
|
|
end
|
|
|
|
|
role = course.course_members.find_by(user_id: id, is_active: 1)&.role
|
|
|
|
|
case role
|
|
|
|
|
when nil then Course::NORMAL
|
|
|
|
|
when 'CREATOR' then Course::CREATOR
|
|
|
|
|