Skip to content

Commit

Permalink
MDL-20534
Browse files Browse the repository at this point in the history
Add the tool_consumer_info fields and fix parsing of custom parameters.
  • Loading branch information
csev authored and scriby committed Nov 17, 2011
1 parent 34eb050 commit 461bde2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mod/lti/locallib.php
Expand Up @@ -173,6 +173,9 @@ function lti_view($instance) {
$requestparams['launch_presentation_return_url'] = $returnurl;
}

$requestparams['tool_consumer_info_product_family_code'] = 'moodle';
$requestparams['tool_consumer_info_version'] = strval($CFG->version);

if (!empty($key) && !empty($secret)) {
$parms = lti_sign_parameters($requestparams, $endpoint, "POST", $key, $secret);
} else {
Expand Down Expand Up @@ -422,7 +425,7 @@ function lti_split_custom_parameters($customstr) {
continue;
}
$key = trim($textlib->substr($line, 0, $pos));
$val = trim($textlib->substr($line, $pos+1));
$val = trim($textlib->substr($line, $pos+1, strlen($line)));
$key = lti_map_keyname($key);
$retval['custom_'.$key] = $val;
}
Expand Down

0 comments on commit 461bde2

Please sign in to comment.