diff --git a/basiclti/basiclti-tool/src/bundle/ltitool.properties b/basiclti/basiclti-tool/src/bundle/ltitool.properties index 8724dd139f2a..ebde66df0f66 100644 --- a/basiclti/basiclti-tool/src/bundle/ltitool.properties +++ b/basiclti/basiclti-tool/src/bundle/ltitool.properties @@ -136,4 +136,9 @@ search.url=Search by URL search.siteid=Search by Site ID search.uses=Search by Usage - +register.may.popup=The registration process may open a popup window. If it opens a popup window, when registration is complete, come back to this page and manually activate the deployment. +register.external.pre.launch=We will now launch an external web site in a new window to do the actual installation. When that process completes, come back to this window and either continue to the Activation process or go back to the deployment list. +register.external.post.launch=If the registration process was successful, your next step is to Activate the registration. If the registration process had a problem, you may need to restart the registration. +register.popup.text=Continue to registration web site +register.done=The external tool has completed its registration process. If the registration process was successful, your next step is to Activate the registration. If the registration process had a problem, you may need to restart the registration. +register.close=Close this window diff --git a/basiclti/basiclti-tool/src/java/org/sakaiproject/blti/tool/LTIAdminTool.java b/basiclti/basiclti-tool/src/java/org/sakaiproject/blti/tool/LTIAdminTool.java index 2ce891e87815..a5cb11e26907 100644 --- a/basiclti/basiclti-tool/src/java/org/sakaiproject/blti/tool/LTIAdminTool.java +++ b/basiclti/basiclti-tool/src/java/org/sakaiproject/blti/tool/LTIAdminTool.java @@ -733,7 +733,7 @@ public String buildDeployRegisterPanelContext(VelocityPortlet portlet, Context c return "lti_error"; } - Long reg_state = foorm.getLongNull(deploy.get(LTIService.LTI_REG_STATE)); + Long reg_state = foorm.getLongNull(deploy.get(LTIService.LTI_REG_STATE)); String reg_key = (String) deploy.get(LTIService.LTI_REG_KEY); String reg_password = (String) deploy.get(LTIService.LTI_REG_PASSWORD); String consumerkey = (String) deploy.get(LTIService.LTI_CONSUMERKEY); @@ -751,7 +751,7 @@ public String buildDeployRegisterPanelContext(VelocityPortlet portlet, Context c // Extract the reg_state to make it view only String fieldInfo = foorm.getFormField(mappingForm, "reg_state"); fieldInfo = fieldInfo.replace(":hidden=true",""); - String formStatus = ltiService.formOutput(deploy, fieldInfo); + String formStatus = ltiService.formOutput(deploy, fieldInfo); context.put("formStatus", formStatus); String formOutput = ltiService.formOutput(deploy, mappingForm); @@ -760,11 +760,21 @@ public String buildDeployRegisterPanelContext(VelocityPortlet portlet, Context c String registerURL = "/access/basiclti/site/~admin/deploy:" + key + "?placement=" + placement.getId(); context.put("registerURL",registerURL); + context.put("isInlineRequest",new Boolean(ToolUtils.isInlineRequest(data.getRequest()))); + context.put("id",key); state.removeAttribute(STATE_SUCCESS); return "lti_deploy_register"; } + public String buildPostRegisterPanelContext(VelocityPortlet portlet, Context context, + RunData data, SessionState state) + { + context.put("tlang", rb); + context.put("includeLatestJQuery", PortalUtils.includeLatestJQuery("LTIAdminTool")); + return "lti_deploy_post_register"; + } + public String buildActivatePanelContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) { diff --git a/basiclti/basiclti-tool/src/webapp/vm/lti_deploy_post_register.vm b/basiclti/basiclti-tool/src/webapp/vm/lti_deploy_post_register.vm new file mode 100644 index 000000000000..f9a5e28442e6 --- /dev/null +++ b/basiclti/basiclti-tool/src/webapp/vm/lti_deploy_post_register.vm @@ -0,0 +1,11 @@ +
+#if ($messageSuccess)
$tlang.getString("gen.success") $validator.escapeHtml($messageSuccess)
#end +#if ($alertMessage)
$tlang.getString("gen.alert") $validator.escapeHtml($alertMessage)
#end +

+$tlang.getString('register.done') +

+

+ +$tlang.getString('register.close') + +

diff --git a/basiclti/basiclti-tool/src/webapp/vm/lti_deploy_register.vm b/basiclti/basiclti-tool/src/webapp/vm/lti_deploy_register.vm index ed0f84b2d13b..87bc733e6a08 100644 --- a/basiclti/basiclti-tool/src/webapp/vm/lti_deploy_register.vm +++ b/basiclti/basiclti-tool/src/webapp/vm/lti_deploy_register.vm @@ -7,9 +7,19 @@
$!formStatus $formOutput +

$tlang.getString('register.external.pre.launch')

+ +

+ $tlang.getString('register.popup.text') +

- +