Skip to content

Commit

Permalink
Merge branch 'MDL-74463-master' of https://github.com/snake/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaies committed Apr 11, 2022
2 parents 217fb9e + 75328ec commit a9a9d8e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions enrol/lti/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
$wwwrooturl = $CFG->wwwroot;
$parsed = parse_url($wwwrooturl);
$sitefullname = format_string(get_site()->fullname);
$scopes = [
'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem',
'https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly',
'https://purl.imsglobal.org/spec/lti-ags/scope/score',
'https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly',
];

$regrequest = (object) [
'application_type' => 'web',
Expand All @@ -111,16 +117,11 @@
'jwks_uri' => $CFG->wwwroot . '/enrol/lti/jwks.php',
'logo_uri' => $OUTPUT->image_url('moodlelogo')->out(false),
'token_endpoint_auth_method' => 'private_key_jwt',
'scope' => implode(" ", $scopes),
'https://purl.imsglobal.org/spec/lti-tool-configuration' => [
'domain' => $parsed['host'],
'target_link_uri' => $CFG->wwwroot . '/enrol/lti/launch.php',
'custom_parameters' => [],
'scopes' => [
'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem',
'https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly',
'https://purl.imsglobal.org/spec/lti-ags/scope/score',
'https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly',
],
'claims' => [
'iss',
'sub',
Expand Down

0 comments on commit a9a9d8e

Please sign in to comment.