From 1272a926d59e3914788939f38fe55897f1db1888 Mon Sep 17 00:00:00 2001 From: Stephen Vickers Date: Thu, 16 Aug 2018 22:41:57 +0100 Subject: [PATCH] MDL-63176 enrol_lti: Add $COURSE to global Ensure that capabilities using $COURSE can be parsed. --- mod/lti/locallib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/lti/locallib.php b/mod/lti/locallib.php index 7ff4363cf18..295581b901b 100644 --- a/mod/lti/locallib.php +++ b/mod/lti/locallib.php @@ -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) == '\\') {