skill_badge.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Show information about Mozilla OpenBadges
  5. * @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
  6. * @package chamilo.admin.openbadges
  7. */
  8. $cidReset = true;
  9. require_once '../inc/global.inc.php';
  10. $this_section = SECTION_PLATFORM_ADMIN;
  11. if (!api_is_platform_admin() || api_get_setting('allow_skills_tool') !== 'true') {
  12. api_not_allowed(true);
  13. }
  14. $backpack = 'https://backpack.openbadges.org/';
  15. $configBackpack = api_get_setting('openbadges_backpack');
  16. if (strcmp($backpack, $configBackpack) !== 0) {
  17. $backpack = $configBackpack;
  18. }
  19. $interbreadcrumb = array(
  20. array(
  21. 'url' => api_get_path(WEB_CODE_PATH) . 'admin/index.php',
  22. 'name' => get_lang('Administration')
  23. )
  24. );
  25. $toolbar = Display::toolbarButton(
  26. get_lang('ManageSkills'),
  27. api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php',
  28. 'list',
  29. 'primary',
  30. ['title' => get_lang('ManageSkills')]
  31. );
  32. $tpl = new Template(get_lang('Badges'));
  33. $tpl->assign('backpack', $backpack);
  34. $contentTemplate = $tpl->fetch('default/skill/badge.tpl');
  35. $tpl->assign('actions', $toolbar);
  36. $tpl->assign('content', $contentTemplate);
  37. $tpl->display_one_col_template();