Merge branch 'MDL-77933-master' of https://github.com/snake/moodle

This commit is contained in:
Andrew Nicols 2023-06-08 12:02:58 +08:00
commit b610b9adbe
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14

View File

@ -34,6 +34,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
use core\context\system;
use enrol_lti\local\ltiadvantage\repository\application_registration_repository;
use enrol_lti\local\ltiadvantage\repository\context_repository;
use enrol_lti\local\ltiadvantage\repository\deployment_repository;
@ -42,7 +43,7 @@ use enrol_lti\local\ltiadvantage\repository\user_repository;
use enrol_lti\local\ltiadvantage\service\application_registration_service;
require_once(__DIR__."/../../config.php");
global $OUTPUT, $PAGE, $CFG;
global $OUTPUT, $PAGE, $CFG, $SITE;
require_once($CFG->libdir . '/filelib.php');
$PAGE->set_context(context_system::instance());
@ -113,9 +114,9 @@ $regrequest = (object) [
$CFG->wwwroot . '/enrol/lti/launch_deeplink.php',
],
// TODO: Consider whether to support client_name#ja syntax for multi language support - see MDL-73109.
'client_name' => get_string('moodle', 'enrol_lti'),
'client_name' => format_string($SITE->fullname, true, ['context' => system::instance()]),
'jwks_uri' => $CFG->wwwroot . '/enrol/lti/jwks.php',
'logo_uri' => $OUTPUT->image_url('moodlelogo')->out(false),
'logo_uri' => $OUTPUT->get_compact_logo_url() ? $OUTPUT->get_compact_logo_url()->out(false) : '',
'token_endpoint_auth_method' => 'private_key_jwt',
'scope' => implode(" ", $scopes),
'https://purl.imsglobal.org/spec/lti-tool-configuration' => [