AnsweredAssumed Answered

Use BasicLTILauncher to launch in new window

Question asked by umesh.badrecha on May 17, 2018

I have a  Building block, i am addging feature to launch LTI with different placement.

I have added a system link to launch. I am making use of BasicLTILauncher.

Its working but opening LTI in new window. I want it to open in the iframe. I tried many ways but it does not works. Here is the sample code i am using.

 

HashMap<String,String> launchPresentation = new HashMap<String,String>();

launchPresentation.put(BasicLTIConstants.PARAM_LAUNCH_PRESENTATION_DOCUMENT_TARGET, BasicLTIConstants.PARAM_LAUNCH_PRESENTATION_TARGET_IFRAME);

 

BasicLTILauncher launcher = new BasicLTILauncher( bltiUrl, bltiKey, bltiSecret, "BbSystemTool" )

    .addResourceLinkInformation( "My Test Tool", "My Test Tool" )

    .addCurrentUserInformation( true, true, true )

    .addCurrentCourseInformation()

    .addCustomToolParameters( customParamMap )

    .addLaunchPresentationInformation(launchPresentation);

launcher.launch( request, response, false, new FormattedText( "You are launching my tool. Click Submit.", FormattedText.Type.PLAIN_TEXT )  );

 

Thanks,

Outcomes