From 78f3381eb48522d1c38f1f9951ac228b1bbae7f2 Mon Sep 17 00:00:00 2001 From: Chris Scribner Date: Tue, 24 Apr 2012 10:48:47 -0400 Subject: [PATCH] Fixing an issue with not sending the launch_presentation_return_url --- mod/lti/locallib.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mod/lti/locallib.php b/mod/lti/locallib.php index 14e8723f6e5..5c096e62ed7 100644 --- a/mod/lti/locallib.php +++ b/mod/lti/locallib.php @@ -162,17 +162,17 @@ function lti_view($instance) { if (empty($key) || empty($secret)) { $returnurlparams['unsigned'] = '1'; - - //Add the return URL. We send the launch container along to help us avoid frames-within-frames when the user returns - $url = new moodle_url('/mod/lti/return.php', $returnurlparams); - $returnurl = $url->out(false); - - if ($typeconfig['forcessl'] == '1') { - $returnurl = lti_ensure_url_is_https($returnurl); - } - - $requestparams['launch_presentation_return_url'] = $returnurl; } + + //Add the return URL. We send the launch container along to help us avoid frames-within-frames when the user returns + $url = new moodle_url('/mod/lti/return.php', $returnurlparams); + $returnurl = $url->out(false); + + if ($typeconfig['forcessl'] == '1') { + $returnurl = lti_ensure_url_is_https($returnurl); + } + + $requestparams['launch_presentation_return_url'] = $returnurl; if (!empty($key) && !empty($secret)) { $parms = lti_sign_parameters($requestparams, $endpoint, "POST", $key, $secret);