Lti_1p3.Tool.Lti_1p3_User protocol (Lti 1p3 v0.6.0)

Link to this section Summary

Functions

Returns all context roles for a given user and context.

Returns all platform roles for a given user

Link to this section Types

@type t() :: term()

Link to this section Functions

Link to this function

get_context_roles(user, context)

Returns all context roles for a given user and context.

The context here is determined by the actual implementation needs and is intended to give the implementation a unique context for which a user has roles, such as a course section identifier. If your tool supports more than one LMS platform, this context data must uniquely identify the specific context across all platforms, for example, using a combination of the issuer, client_id and and context_id

examples

Examples

iex> get_platform_roles(%Lti_1p3.Tool.Lti_1p3_User{}, "issuer-client_id-context_id")
[%ContextRole{}]
Link to this function

get_platform_roles(user)

Returns all platform roles for a given user

examples

Examples

iex> get_platform_roles(%Lti_1p3.Tool.Lti_1p3_User{})
[%PlatformRole{}]