skill_badge.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Show information about Mozilla OpenBadges.
  5. *
  6. * @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
  7. *
  8. * @package chamilo.admin.openbadges
  9. */
  10. $cidReset = true;
  11. require_once __DIR__.'/../inc/global.inc.php';
  12. $this_section = SECTION_PLATFORM_ADMIN;
  13. api_protect_admin_script();
  14. Skill::isAllowed();
  15. $backpack = 'https://backpack.openbadges.org/';
  16. $configBackpack = api_get_setting('openbadges_backpack');
  17. if (strcmp($backpack, $configBackpack) !== 0) {
  18. $backpack = $configBackpack;
  19. }
  20. $interbreadcrumb = [
  21. [
  22. 'url' => api_get_path(WEB_CODE_PATH).'admin/index.php',
  23. 'name' => get_lang('Administration'),
  24. ],
  25. ];
  26. $toolbar = Display::url(
  27. Display::return_icon(
  28. 'list_badges.png',
  29. get_lang('Manage skills'),
  30. null,
  31. ICON_SIZE_MEDIUM
  32. ),
  33. api_get_path(WEB_CODE_PATH).'admin/skill_list.php',
  34. ['title' => get_lang('Manage skills')]
  35. );
  36. $tpl = new Template(get_lang('Badges'));
  37. $tpl->assign('backpack', $backpack);
  38. $templateName = $tpl->get_template('skill/badge.tpl');
  39. $contentTemplate = $tpl->fetch($templateName);
  40. $tpl->assign(
  41. 'actions',
  42. Display::toolbarAction('toolbar', [$toolbar])
  43. );
  44. $tpl->assign('content', $contentTemplate);
  45. $tpl->display_one_col_template();