LinkedIn Learning data flows
Here we have outlined the data flows between Totara and LinkedIn Learning using flow diagrams, and we have shown the request/response formats used in the data exchange. For general guidance on getting started with LinkedIn Learning in Totara, please see Set up the LinkedIn Learning integration.
LinkedIn Learning content is kept up to date in the Totara site by the Update learning object metadata scheduled task, which by default runs daily at 4:14am. LinkedIn Learning releases new courses nightly, around midnight Pacific Standard Time (PST).
LinkedIn Learning content syncing
Obtain access token using client ID & secret. The following data is sent to the https://www.linkedin.com/oauth/v2/accessToken endpoint. The client ID and secret are obtained from LinkedIn Learning when they are generated there.
Request:{ Â Â "client_id": "XXXXXXXXXX", Â Â "client_secret": "XXXXXXXXXX", Â Â "grant_type": "client_credentials", }
Response:
{ Â Â Â Â Â "access_token": "XXXXXXXXXX", Â Â Â Â Â "expires_in": "XXXXXXXXXX", Â Â Â Â Â "grant_type": "client_credentials", }
The access token and its expiration time obtained from the response above are saved in the config table for this component. It is used to make any subsequent requests to LinkedIn Learning. If there is an authentication exception during this request Totara will attempt to refresh the token and repeat the request again.
Sync classifications. This flow is used to fetch classifications from LinkedIn and store them locally to display categorised content without requesting the data from LinkedIn. An example of the classification response is below:
{ Â Â "paging": { Â Â Â "start": 0, Â Â Â "count": 100, Â Â Â "links": [], Â Â Â "total": 3 Â Â }, Â Â "elements": [ Â Â Â { Â Â Â Â "name": { Â Â Â Â Â "locale": { Â Â Â Â Â Â "country": "US", Â Â Â Â Â Â "language": "en" Â Â Â Â Â Â }, Â Â Â Â Â Â "value": "Creative" Â Â Â Â Â }, Â Â Â Â "owner": { Â Â Â Â Â "urn": "urn:li:organization:1337", Â Â Â Â Â "name": { Â Â Â Â Â Â "locale": { Â Â Â Â Â Â Â "country": "US", Â Â Â Â Â Â Â "language": "en" Â Â Â Â Â Â }, Â Â Â Â Â Â "value": "LinkedIn" Â Â Â Â Â } Â Â Â Â }, Â Â Â Â "urn": "urn:li:lyndaCategory:7163", Â Â Â Â "type": "LIBRARY" Â Â Â }, Â Â ] }
The synced data is stored in the marketplace_linkedin_classification table.
Sync learning assets. This flow is used to store course metadata in the Totara database. This includes information such as the course title, description, etc. An example of the learning asset response is below:
{ "urn": "urn:li:lyndaCourse:252", "details": { "images": { "primary": "https://cdn.lynda.com/course/252/252-636282989834935258-16x9.jpg" }, "descriptionIncludingHtml": { "locale": { "country": "US", "language": "en" }, "value": "Like the other applications in Microsoft Office 2007, Excel 2007 boasts upgraded features and a brand-new look. In <em> Excel 2007 Essential Training </em>, instructor Lorna A. Daly introduces the new version in detail. The training begins with the essentials of using the program, including how and why to use a spreadsheet, how to set up and modify worksheets, and how to import and export data. Lorna then moves on to teach more advanced features, such as working with functions and macros. Exercise files accompany the tutorials." }, "lastUpdatedAt": 1613522076915, "publishedAt": 1170201600000, "level": "BEGINNER", "description": { "locale": { "country": "US", "language": "en" }, "value": "Like the other applications in Microsoft Office 2007, Excel 2007 boasts upgraded features and a brand-new look. In Excel 2007 Essential Training , instructor Lorna A. Daly introduces the new version in detail. The training begins with the essentials of using the program, including how and why to use a spreadsheet, how to set up and modify worksheets, and how to import and export data. Lorna then moves on to teach more advanced features, such as working with functions and macros. Exercise files accompany the tutorials." }, "shortDescription": { "locale": { "country": "US", "language": "en" }, "value": "A detailed look at the features and uses of Excel 2007, including how and why to use spreadsheets." }, "availability": "AVAILABLE", "availableLocales": [ { "country": "US", "language": "en" } ], "relationships": [], "classifications": [ { "assigner": { "urn": "urn:li:organization:1337", "name": { "locale": { "country": "US", "language": "en" }, "value": "LinkedIn" } }, "path": [], "associatedClassification": { "owner": { "urn": "urn:li:organization:1337", "name": { "locale": { "country": "US", "language": "en" }, "value": "LinkedIn" } }, "name": { "locale": { "country": "US", "language": "en" }, "value": "Microsoft Excel" }, "urn": "urn:li:skill:163", "type": "SKILL" } } ], "urls": { "ssoLaunch": "https://www.linkedin.com/checkpoint/enterprise/login/105587602?pathWildcard=105587602&application=learning&redirect=https%3A%2F%2Fwww%2Elinkedin%2Ecom%2Flearning%2Fexcel-2007-essential-training%3Fu%3D105587602", "webLaunch": "https://www.linkedin.com/learning/excel-2007-essential-training", "aiccLaunch": "https://www.linkedin.com/learning/aicc?content=urn%3Ali%3AlyndaCourse%3A252&account=urn%3Ali%3AenterpriseApplicationInstance%3A%28urn%3Ali%3AenterpriseAccount%3A105587602%2C113669290%29" }, "shortDescriptionIncludingHtml": { "locale": { "country": "US", "language": "en" }, "value": "A detailed look at the features and uses of Excel 2007, including how and why to use spreadsheets." }, "contributors": [ { "name": { "locale": { "country": "US", "language": "en" }, "value": "Lorna Daly" }, "urn": "urn:li:lyndaAuthor:88", "contributionType": "AUTHOR", "authorDetails": { "lastName": { "locale": { "country": "US", "language": "en" }, "value": "Daly" }, "firstName": { "locale": { "country": "US", "language": "en" }, "value": "Lorna" } } } ], "timeToComplete": { "duration": 18790, "unit": "SECOND" } }, "title": { "locale": { "country": "US", "language": "en" }, "value": "Excel 2007 Essential Training" }, "type": "COURSE", "contents": [ { "asset": { "urn": "urn:li:lyndaChapter:(urn:li:lyndaCourse:252,4472)", "title": { "locale": { "country": "US", "language": "en" }, "value": "Introduction" }, "type": "CHAPTER", "contents": [ { "asset": { "urn": "urn:li:lyndaVideo:(urn:li:lyndaCourse:252,24961)", "title": { "locale": { "country": "US", "language": "en" }, "value": "Welcome" }, "type": "VIDEO", "contents": [] } } ] } } ] }
The synced learning object data is stored in the marketplace_linkedin_learning_object table.
LinkedIn Learning non-SSO user login
The process with non-SSO user login is straightforward, since there is no login data exchange between Totara and LinkedIn Learning. The user logs in to Totara and LinkedIn Learning separately with no data exchange.
LinkedIn Learning SSO user login
Totara relies on the SAML plugin for SSO integration with LinkedIn Learning, so the dataflow for SSO is not covered by this documentation. Even though the user authenticates against external IdP, Totara stores the local copy of the user.
LinkedIn Learning user completion
Totara acts as the OAuth2 server and LinkedIn Learning acts as the OAuth2 client in this case.Â
- Totara uses League's OAuth2 server library to issue and validate OAuth2 access tokens for LinkedIn Learning.
LinkedIn Learning sends back xAPI statements with OAuth2 access tokens with the following statement format:
{ "actor": { "mbox": "mailto:bolobala@example.com", "objectType": "Agent" }, "result": { "completion": false, "extensions": { "https://w3id.org/xapi/cmi5/result/extensions/progress": "39" } }, "verb": { "display": { "en-US": "PROGRESSED" }, "id": "http://adlnet.gov/expapi/verbs/progressed" }, "id": "6a9fefbb-3517-4b92-9d5e-5710aaba924f", "object": { "definition": { "type": "http://adlnet.gov/expapi/activities/course" }, "id": "urn:li:lyndaCourse:1222", "objectType": "Activity" }, "timestamp": "2021-08-18T04:44:23.764Z" }
- Totara validates the access token and generates a completion record based on the statement.