SAP Knowledge Base Article - Public

2458825 - Content is unable to find the SCORM API

Symptom

When SCORM content is launched, the first thing it does is to search for the LMS communication piece, an object called "API".

The content searches all the frames in its own window first, and if it does not find the API object, it attempts to search in its opener window. In SAP SuccessFactors Administration, the API is hosted in the learner application, so the content will have to search the opener window to find the API. 

Environment

SuccessFactors Learning Management System (LMS) - All Supported Versions

Cause

There are several reasons why the content may not be able to find the API.

Resolution

1. Make sure the content is specified as a "SCORM" type content object in SAP SuccessFactors Administration. (Use "Browser" type for SAP SuccessFactors Administration v.4.2 and earlier). The SCORM 1.2 API is not available to AICC, Browser, SCORM2004 or Document type content objects.

2. If the content is hosted under a separate DNS name (server name) from the LMS, the content will not be able to access the API. The browser, for security reasons, will prevent the content from searching in the opener window and will usually give an "Access Denied" error. For more information, please see Cross-Domain Communication Restriction.

3. The code that looks for the API may need to be altered. Typically there will be an APIWrapper.js file that contains functions provided by ADL (writers of the SCORM spec). The functions that locate the API are "getAPI" and "findAPI". The getAPI function calls the findAPI function and specifies a window to search. As mentioned above, the content will first search the content window, and then the opener window (SAP SuccessFactors Administration student piece). The getAPI call to search the opener window is usually:

  • Sample Code

theAPI = findAPI(window.opener);


If the SCORM content is using frames, this function call will not make sense to the browser because it will look for the opener of a particular frame. It may be necessary to fix this line of code to search the opener of the frameset as follows:

  • Sample Code

theAPI = findAPI(top.window.opener);


Likewise, if the content is using an opener window to format the content's browser window, the content will be two levels out from the LMS and thus the proper call would need to be:

  • Sample Code

theAPI = findAPI(top.opener.opener);

Keywords

SCORM, API, Content, SCORM 1.2 API, Browser, SCORM2004, Document type, API object , KBA , LOD-SF-LMS-CNT , Content , How To

Product

SAP SuccessFactors Learning all versions