skill_badge.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. use Chamilo\CoreBundle\Framework\Container;
  4. /**
  5. * Show information about Mozilla OpenBadges
  6. * @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
  7. * @package chamilo.admin.openbadges
  8. */
  9. $cidReset = true;
  10. //require_once '../inc/global.inc.php';
  11. $this_section = SECTION_PLATFORM_ADMIN;
  12. if (!api_is_platform_admin() || api_get_setting(
  13. 'skill.allow_skills_tool'
  14. ) !== 'true'
  15. ) {
  16. api_not_allowed(true);
  17. }
  18. $backpack = 'https://backpack.openbadges.org/';
  19. $configBackpack = api_get_setting('gradebook.openbadges_backpack');
  20. if (strcmp($backpack, $configBackpack) !== 0) {
  21. $backpack = $configBackpack;
  22. }
  23. $interbreadcrumb = array(
  24. array(
  25. 'url' => api_get_path(WEB_CODE_PATH) . 'admin/index.php',
  26. 'name' => get_lang('Administration')
  27. )
  28. );
  29. $interbreadcrumb[] =
  30. array(
  31. 'url' => '#',
  32. 'name' => get_lang('Badges')
  33. )
  34. ;
  35. $toolbar = Display::toolbarButton(
  36. get_lang('ManageSkills'),
  37. api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php',
  38. 'list',
  39. 'primary',
  40. ['title' => get_lang('ManageSkills')]
  41. );
  42. //$tpl = new Template(get_lang('Badges'));
  43. echo $toolbar;
  44. echo Container::getTemplating()->render(
  45. '@template_style/skill/badge.html.twig',
  46. [
  47. 'backpack' => $backpack
  48. ]
  49. );