diff options
Diffstat (limited to 'app/views/course/lti/iframe.php')
| -rw-r--r-- | app/views/course/lti/iframe.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/views/course/lti/iframe.php b/app/views/course/lti/iframe.php index 79cbd60..777cd78 100644 --- a/app/views/course/lti/iframe.php +++ b/app/views/course/lti/iframe.php @@ -4,7 +4,7 @@ * @var ?LtiResourceLink $resource_link * @var array $launch_data * @var string $signature - * @var bool $lti13a_mode + * @var string $version * @var \OAT\Library\Lti1p3Core\Message\LtiMessage $message */ ?> @@ -13,20 +13,23 @@ <html> <head> <meta charset="UTF-8"> - <? if (!$lti13a_mode) : ?> + <? if ($version === '1.1') : ?> <script type="text/javascript"> - window.onload=document.ltiLaunchForm.submit(); + document.addEventListener("DOMContentLoaded", function () { + document.ltiLaunchForm.submit(); + }); </script> <? endif ?> </head> <body> - <? if ($lti13a_mode) : ?> + <? if ($version === '1.3a'): ?> <? if ($message) : ?> <?= $message->toHtmlRedirectForm(Request::submitted('do_not_send') ? false : true) ?> <? else: ?> <?= _('Das LTI-Tool kann nicht aufgerufen werden.') ?> <? endif ?> - <? else : ?> + <? endif ?> + <? if ($version === '1.1'): ?> <form name="ltiLaunchForm" method="post" action="<?= htmlReady($resource_link->deployment->getLaunchUrl()) ?>"> <? foreach ($launch_data as $key => $value): ?> <input type="hidden" name="<?= htmlReady($key) ?>" value="<?= htmlReady($value, false) ?>"> |
