start.php 882 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /* For license terms, see /license.txt */
  3. use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool;
  4. require_once __DIR__.'/../../main/inc/global.inc.php';
  5. api_protect_course_script();
  6. $em = Database::getManager();
  7. /** @var ImsLtiTool $tool */
  8. $tool = isset($_GET['id']) ? $em->find('ChamiloPluginBundle:ImsLti\ImsLtiTool', intval($_GET['id'])) : null;
  9. if (!$tool) {
  10. api_not_allowed(true);
  11. }
  12. $imsLtiPlugin = ImsLtiPlugin::create();
  13. $pageTitle = Security::remove_XSS($tool->getName());
  14. $template = new Template($pageTitle);
  15. $template->assign('tool', $tool);
  16. $template->assign(
  17. 'launch_url',
  18. api_get_path(WEB_PLUGIN_PATH).'ims_lti/form.php?'.http_build_query(['id' => $tool->getId()])
  19. );
  20. $content = $template->fetch('ims_lti/view/start.tpl');
  21. $template->assign('header', $pageTitle);
  22. $template->assign('content', $content);
  23. $template->display_one_col_template();