Files
Chamilo/plugin/ims_lti/tool_settings.php
Xes 73154ae174
Behat tests 1.11.x 🐞 / PHP 7.4 Test on ubuntu-latest (push) Canceled after 0s
PHP-CS-Fixer / composer_install (7.4) (push) Canceled after 0s
Chamilo 1.11.40 (ZIP oficial v1.11.40)
Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip
sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439
Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
2026-08-06 17:59:45 +02:00

67 lines
2.3 KiB
PHP

<?php
/* For licensing terms, see /license.txt */
use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
$cidReset = true;
require_once __DIR__.'/../../main/inc/global.inc.php';
api_block_anonymous_users(false);
$plugin = ImsLtiPlugin::create();
$webPluginPath = api_get_path(WEB_PLUGIN_PATH).'ims_lti/';
$request = Request::createFromGlobals();
$response = new Response();
$em = Database::getManager();
try {
if ($plugin->get('enabled') !== 'true') {
throw new Exception(get_lang('Forbidden'));
}
/** @var ImsLtiTool $tool */
$tool = $em->find('ChamiloPluginBundle:ImsLti\ImsLtiTool', $request->query->get('id'));
if (!$tool) {
throw new Exception($plugin->get_lang('NoTool'));
}
$html = '<div class="row">'
.'<div class="col-xs-5 text-right"><strong>'.$plugin->get_lang('PlatformId').'</strong></div>'
.'<div class="col-xs-7">'.ImsLtiPlugin::getIssuerUrl().'</div>'
.'</div>'
.'<div class="row">'
.'<div class="col-xs-5 text-right"><strong>'.$plugin->get_lang('DeploymentId').'</strong></div>'
.'<div class="col-xs-7">'.($tool->getParent() ? $tool->getParent()->getId() : $tool->getId()).'</div>'
.'</div>'
.'<div class="row">'
.'<div class="col-xs-5 text-right"><strong>'.$plugin->get_lang('ClientId').'</strong></div>'
.'<div class="col-xs-7">'.$tool->getClientId().'</div>'
.'</div>'
.'<div class="row">'
.'<div class="col-xs-5 text-right"><strong>'.$plugin->get_lang('AuthUrl').'</strong></div>'
.'<div class="col-xs-7">'.$webPluginPath.'auth.php</div>'
.'</div>'
.'<div class="row">'
.'<div class="col-xs-5 text-right"><strong>'.$plugin->get_lang('TokenUrl').'</strong></div>'
.'<div class="col-xs-7">'.$webPluginPath.'token.php</div>'
.'</div>'
.'<div class="row">'
.'<div class="col-xs-5 text-right"><strong>'.$plugin->get_lang('KeySetUrl').'</strong></div>'
.'<div class="col-xs-7">'.$webPluginPath.'jwks.php</div>'
.'</div>';
$response->setContent($html);
} catch (Exception $exception) {
$response->setContent(
Display::return_message($exception->getMessage(), 'error')
);
}
$response->send();