Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

  1. 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:

    Code Block
    {
        "client_id": "XXXXXXXXXX",
        "client_secret": "XXXXXXXXXX",
        "grant_type": "client_credentials",
    }

    Response:

    Code Block
    {
              "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.

  2. 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:

    Code Block
    {
       "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.

  3. 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:

    Code Block
    {
      "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.

...