MDL-62969 mod_lti: fix parsed value for LtiLink.memberships.url
authorCory Buecker <cory@polleverywhere.com>
Tue, 24 Jul 2018 17:23:45 +0000 (12:23 -0500)
committerMark Nelson <markn@moodle.com>
Wed, 25 Jul 2018 03:59:36 +0000 (11:59 +0800)
Fixes a typo in the function that replaces the LTI placeholder variable
LtiLink.memberships.url with the actual endpoint. Without this change,
the placeholder variable, "$LtiLink.memberships.url" is not replaced in
the LTI launch parameters.

mod/lti/service/memberships/classes/local/resources/linkmemberships.php

index 621a3dd..bcbb01a 100644 (file)
@@ -146,7 +146,7 @@ class linkmemberships extends resource_base {
      */
     public function parse_value($value) {
 
-        if (strpos($value, '$ToolProxyBinding.memberships.url') !== false) {
+        if (strpos($value, '$LtiLink.memberships.url') !== false) {
             $id = optional_param('id', 0, PARAM_INT); // Course Module ID.
             if (!empty($id)) {
                 $cm = get_coursemodule_from_id('lti', $id, 0, false, MUST_EXIST);