LTI

Learning Tools Interoperability (LTI) is a method for a learning systems to invoke and to communicate with other systems. This is done using OAuth2, OpenID Connect, and JWT. In LTI, a system can act as a consumer (consuming external resources) or provider.

Currently, our backend acts a LTI provider

Authentication (LTI Launch Request)

When our platform acts as a LTI provider, the LTI consumer will typically call our infrastructure with “LTI Launch Request” providing LTI parameters. These can be handled by the login-module which can verify them and create a local user if needed.

Our current two use cases are:

  • A platform using our items in an embedded iframe. The tasks and chapters are loaded via a POST request which is redirected to the content to be displayed. The score can also be sent back to the platform (not detailed here).
  • A LTI-enabled website redirects their users to our platforms so that the user can utilize our platform without further authentication.

In both cases, the LTI Launch request is a POST with LTI authentication parameters, which can be redirected to the actual content. In the following workflow, the first case includes a “content_id”, the second one does not.

select task
select task
LTI Consumer
(EDx, ...)
LTI Consumer...
Algorea Backend
Algorea Back...
Login Module
Login Module
POST /lti/launch?content_id=1234&redirect_to=<cfr next request> + all lti parameters
POST /lti/launch?content_id=1234&redirect_to=<cfr next request> + all lti parameters
iframe to <cfr next request>
iframe to <cfr next request>
Redirect 303 to https://spa.url/bare/?content_id=1234&user_id=<login-module-user-id>
Redirect 303 to https://spa.url/bare/?content_id=1234&user_id=<login-module-user-id>
Algorea Frontend
(SPA)
Algorea Fron...
validate LTI launch request
create LTI connection (links user_id, content_id,
lti_context_id, lti_user_id)
create user if not existing
validate LTI launch request...
check in local storage that user_id is last encountered user:
if user_id is the last known "login_id" (i.e., id from login-module) AND token is still valid: use the last token
otherwise: do "silent auth" (using the login module cookie, not prompting the user) [cfr auth workflow]
check in local storage that user_id is last encountered user:...
/bare/?content_id=1234
&user_id=<login-module-user-id>
/bare/?content_id=1234...
Viewer does not support full SVG 1.1

Sending scores (LTI Outcome)

If a content_id has been provided with the launch request, the score of the item can be sent back the LTI consumer, with the following workflow:

"send score"
"send score"
LTI Consumer
(EDx, ...)
LTI Consumer...
Algorea Backend
Algorea Back...
Login Module
Login Module
Algorea Frontend
(SPA)
Algorea Fron...
POST/attempts/{id}
/items/{id}/publish
POST/attempts/{id}...
POST /platform_api/send_result
+ user_id + content_id + score
POST /platform_api/send_result...
find lti info from
user_id and content_id
find lti info from...
write-outcome service
+ LTI params + score
write-outcome service...
Viewer does not support full SVG 1.1