skill_badge.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. api_protect_admin_script();
  12. Skill::isAllow();
  13. $backpack = 'https://backpack.openbadges.org/';
  14. $configBackpack = api_get_setting('openbadges_backpack');
  15. if (strcmp($backpack, $configBackpack) !== 0) {
  16. $backpack = $configBackpack;
  17. }
  18. $interbreadcrumb = array(
  19. array(
  20. 'url' => api_get_path(WEB_CODE_PATH).'admin/index.php',
  21. 'name' => get_lang('Administration')
  22. )
  23. );
  24. $toolbar = Display::url(
  25. Display::return_icon(
  26. 'list_badges.png',
  27. get_lang('ManageSkills'),
  28. null,
  29. ICON_SIZE_MEDIUM
  30. ),
  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();