skill_badge.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 __DIR__.'/../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::url(
  26. Display::return_icon(
  27. 'list_badges.png',
  28. get_lang('ManageSkills'),
  29. null,
  30. ICON_SIZE_MEDIUM),
  31. api_get_path(WEB_CODE_PATH).'admin/skill_list.php',
  32. ['title' => get_lang('ManageSkills')]
  33. );
  34. $tpl = new Template(get_lang('Badges'));
  35. $tpl->assign('backpack', $backpack);
  36. $templateName = $tpl->get_template('skill/badge.tpl');
  37. $contentTemplate = $tpl->fetch($templateName);
  38. $tpl->assign(
  39. 'actions',
  40. Display::toolbarAction('toolbar', [$toolbar])
  41. );
  42. $tpl->assign('content', $contentTemplate);
  43. $tpl->display_one_col_template();