skill_badge_list.php 1.2 KB

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