MDL-63176 enrol_lti: Add $COURSE to global

Ensure that capabilities using $COURSE can be parsed.
This commit is contained in:
Stephen Vickers 2018-08-16 22:44:18 +01:00 committed by GitHub
parent 4bd4b46070
commit 349ac5cbd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1278,8 +1278,8 @@ function lti_get_custom_parameters($toolproxy, $tool, $params, $parameters) {
* @return string Parsed value of custom parameter
*/
function lti_parse_custom_parameter($toolproxy, $tool, $params, $value, $islti2) {
// This is required as {${$valarr[0]}->{$valarr[1]}}" may be using the USER var.
global $USER;
// This is required as {${$valarr[0]}->{$valarr[1]}}" may be using the USER or COURSE var.
global $USER, $COURSE;
if ($value) {
if (substr($value, 0, 1) == '\\') {