Skip to content

Commit

Permalink
LTI: If no email is set for LTI user, use <id>@test.com
Browse files Browse the repository at this point in the history
  • Loading branch information
torinfo committed Dec 22, 2023
1 parent e3c2885 commit 8259c85
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lti_launch.php
Expand Up @@ -37,6 +37,7 @@
global $x_embed;
global $x_embed_activated;

_debug("SERVER: " . print_r($_SERVER, true));
_debug("LTI launch request: " . print_r($_POST, true));

if (isset($_GET["template_id"])) {
Expand All @@ -52,8 +53,11 @@
{
$tsugi_enabled = true;
$lti_enabled = true;
_debug("Start launch");
$LAUNCH = LTIX::requireData(LTIX::USER);

_debug("LTI launch: " . print_r($LAUNCH, true));

if (method_exists($LAUNCH, 'isLTIAdvantage'))
{
$islti13 = $LAUNCH->isLTIAdvantage();
Expand All @@ -79,6 +83,10 @@

_debug("LTI user: " . print_r($USER, true));
$xerte_toolkits_site->lti_user = $USER;
if (!isset($xerte_toolkits_site->lti_user->email))
{
$xerte_toolkits_site->lti_user->email = $xerte_toolkits_site->lti_user->id . '@test.com';
}

$group = $LAUNCH->ltiParameter('group');
if ($group === false)
Expand Down

0 comments on commit 8259c85

Please sign in to comment.