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

This commit is contained in:
Huong Nguyen 2023-07-04 15:15:33 +07:00
commit 1e804cdb6a
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A

View File

@ -108,10 +108,12 @@ $auth->complete_login(
$legacyconsumersecrets ?? []
);
require_login(null, false);
global $USER, $CFG, $PAGE;
// Page URL must be set before the require_login check, so that things like policies can redirect back with the launchid.
$PAGE->set_url(new moodle_url('/enrol/lti/launch.php'), ['launchid' => $messagelaunch->getLaunchId()]);
require_login(null, false);
$PAGE->set_context(context_system::instance());
$PAGE->set_url(new moodle_url('/enrol/lti/launch.php'));
$PAGE->set_pagelayout('popup'); // Same layout as the tool.php page in Legacy 1.1/2.0 launches.
$PAGE->set_title(get_string('opentool', 'enrol_lti'));