skill_list.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Skill list for management
  5. * @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
  6. * @package chamilo.admin
  7. */
  8. use ChamiloSession as Session;
  9. $cidReset = true;
  10. require_once '../inc/global.inc.php';
  11. $this_section = SECTION_PLATFORM_ADMIN;
  12. api_protect_admin_script();
  13. if (api_get_setting('allow_skills_tool') != 'true') {
  14. api_not_allowed();
  15. }
  16. $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
  17. $message = Session::has('message') ? Session::read('message') : null;
  18. $toolbar = Display::toolbarButton(
  19. get_lang('CreateSkill'),
  20. api_get_path(WEB_CODE_PATH) . 'admin/skill_create.php',
  21. 'plus',
  22. 'success',
  23. ['title' => get_lang('CreateSkill')]
  24. );
  25. $toolbar .= Display::toolbarButton(
  26. get_lang('SkillsWheel'),
  27. api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php',
  28. 'bullseye',
  29. 'primary',
  30. ['title' => get_lang('CreateSkill')]
  31. );
  32. /* View */
  33. $skill = new Skill();
  34. $skillList = $skill->get_all();
  35. $tpl = new Template(get_lang('ManageSkills'));
  36. $tpl->assign('message', $message);
  37. $tpl->assign('skills', $skillList);
  38. $content = $tpl->fetch('default/skill/list.tpl');
  39. $tpl->assign('actions', $toolbar);
  40. $tpl->assign('content', $content);
  41. $tpl->display_one_col_template();
  42. Session::erase('message');