Follow

Launching xAPI content in LMS window instead of new window

Avatar

We normally recommend launching xAPI content in a new window and leaving the 'player' window open for further LMS navigation. Sometimes though, it is appropriate to show the xAPI content in the same window as the launching LMS like in a portlet environment for example. SCORM Engine allows you to change this Package Property for player launch using the property editor, but does not allow for an easy way to do this for every package imported automatically.

 

In order to automatically change that property (or any others) when you import a new package, use this override sample code. This uses PerformPostImportActions which happens as the final step in the import process.

 

public void PerformPostImportActions(ImportResult importResult, ExternalConfiguration externalConfig) throws Exception {

    //create an externalPackageId using your integration implementation and parse it from the importResult
    ExternalPackageId packageId = Integration.getImplementation().GetExternalPackageIdObject();
    packageId.ParseFromString(importResult.getSerializedExternalPackageId());

    //create the PackageProperties object to manipulate from the package settings
    PackageProperties props = ScormEngineManager.GetPackageProperties(packageId, externalConfig);


    //set the values you want to change
    props.setPlayerLaunchType(new LaunchType(LaunchTypeValue.FRAMESET));
    props.setScoLaunchType(new LaunchType(LaunchTypeValue.FRAMESET));

    //update the package properties in the db
    ScormEngineManager.UpdatePackageProperties(props, packageId,externalConfig, Scope.ALL );
}

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Plaisted, Frederick

    Hey Brian - this info appears to be related to SCORM Engine - I think I need to do thesSame thing in SCORM Cloud but am not sure how do do it.

    Is it possible to make a xAPI dispatch that does NOT open a new window from my LMS???

Powered by Zendesk