Customizations

The Landing Page

RXD comes with a landing page, rxd/contentAPI.html, that is intended to make it easy for content to integrate with the RXD API. This page receives the contentUrl value as configured in the configuration.js, loads the RXD API JavaScript file, and then loads the content in an iframe. This makes it possible for the content then to always access the RXD API via the window.parent.RXD location and not have to worry about loading the RXD script file itself. This page should be hosted on the same domain as the content itself. This page can be used by all content and packages for that domain.

If for some reason the contentAPI.html page is not sufficient for your needs then the path to the landing page can be customized via the contentApi property in the configuration.js file. The value should either be a path to the landing page that will be appended to the rxdHostUrl, or should be an absolute URL. The landing page should expect to receive the contentUrl that should then be loaded.

If no landing page is desired and the content will handle loading the RXD API and initialize communications directly itself, then the contentApi property should be set to an empty string. This will cause the contentUrl to be loaded directly by the proxy package. In this case, after the RXD API script has been loaded the content will need to call the RXD.Initialize() function to establish communication with the proxy package and the launching LMS.

Pre-Launch Configuration

To enable configuration of how data will be passed from the proxy package to the content, a preLaunchConfigurationUrl can be specified in the configuration.js file. Currently this is intended to alter the format of the learner information, identifier and name, before sending to the content. This can be used to prevent exposing sensitive PII from the LMS to the content (i.e. to assist with GDPR). The URL will be loaded from the remote LMS so may have to support the appropriate CORS headers.

The value returned from the URL should be a JSON object in the following format:

{
    learnerIdTemplate: "{{learnerId}}",
    learnerFirstNameTemplate: "{{learnerFirstName}}",
    learnerLastNameTemplate: "{{learnerLastName}}"
}

Where the possible values for the properties are strings with replacements that will be made before sending to the content. The following replacements are supported:

  • learnerIdTemplate: learnerId, learnerIdHash
  • learnerFirstNameTemplate: learnerFirstName, learnerFirstNameHash
  • learnerLastNameTemplate: learnerLastName, learnerLastNameHash

The hashed values will be hex encoded SHA256 hashes of the value provided from the LMS.

results matching ""

    No results matching ""