From 058cd1c1d001f90fb19acf7b1fc785260516b277 Mon Sep 17 00:00:00 2001 From: spvickers Date: Tue, 7 Apr 2015 18:42:35 +0100 Subject: [PATCH] MDL-49776 mod_lti: Set parameter in privacy check Moved sending of the lis_result_sourcedid parameter to within the block which checks that grades are being accepted for the link. --- mod/lti/locallib.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mod/lti/locallib.php b/mod/lti/locallib.php index c51dda6cc1f..28ab4fcfb8c 100644 --- a/mod/lti/locallib.php +++ b/mod/lti/locallib.php @@ -368,15 +368,13 @@ function lti_build_request($instance, $typeconfig, $course, $typeid = null, $isl } $placementsecret = $instance->servicesalt; - if ( isset($placementsecret) ) { - $sourcedid = json_encode(lti_build_sourcedid($instance->id, $USER->id, $placementsecret, $typeid)); - $requestparams['lis_result_sourcedid'] = $sourcedid; - } - if ( isset($placementsecret) && ($islti2 || $typeconfig['acceptgrades'] == LTI_SETTING_ALWAYS || ($typeconfig['acceptgrades'] == LTI_SETTING_DELEGATE && $instance->instructorchoiceacceptgrades == LTI_SETTING_ALWAYS))) { + $sourcedid = json_encode(lti_build_sourcedid($instance->id, $USER->id, $placementsecret, $typeid)); + $requestparams['lis_result_sourcedid'] = $sourcedid; + // Add outcome service URL. $serviceurl = new \moodle_url('/mod/lti/service.php'); $serviceurl = $serviceurl->out();