module IMS::LTI::DeprecatedRoleChecks
Public Instance Methods
admin?()
click to toggle source
Convenience method for checking if the user has 'administrator' role
# File lib/ims/lti/deprecated_role_checks.rb, line 43 def admin? has_role?('administrator') end
content_developer?()
click to toggle source
Convenience method for checking if the user has 'contentdeveloper' role
# File lib/ims/lti/deprecated_role_checks.rb, line 23 def content_developer? has_role?('ContentDeveloper') end
has_role?(role)
click to toggle source
Check whether the Launch Parameters have a role
# File lib/ims/lti/deprecated_role_checks.rb, line 7 def has_role?(role) role = role.downcase @roles && @roles.any?{|r| r.downcase.index(role)} end
instructor?()
click to toggle source
Convenience method for checking if the user has 'instructor' or 'faculty' or 'staff' role
# File lib/ims/lti/deprecated_role_checks.rb, line 18 def instructor? has_role?('instructor') || has_role?('faculty') || has_role?('staff') end
manager?()
click to toggle source
Convenience method for checking if the user has 'Manager' role
# File lib/ims/lti/deprecated_role_checks.rb, line 33 def manager? has_role?('Manager') end
member?()
click to toggle source
Convenience method for checking if the user has 'Member' role
# File lib/ims/lti/deprecated_role_checks.rb, line 28 def member? has_role?('Member') end
mentor?()
click to toggle source
Convenience method for checking if the user has 'Mentor' role
# File lib/ims/lti/deprecated_role_checks.rb, line 38 def mentor? has_role?('Mentor') end
student?()
click to toggle source
Convenience method for checking if the user has 'learner' or 'student' role
# File lib/ims/lti/deprecated_role_checks.rb, line 13 def student? has_role?('learner') || has_role?('student') end
ta?()
click to toggle source
Convenience method for checking if the user has 'TeachingAssistant' role
# File lib/ims/lti/deprecated_role_checks.rb, line 48 def ta? has_role?('TeachingAssistant') end