skills.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * @package chamilo.admin
  5. */
  6. $cidReset = true;
  7. require_once __DIR__.'/../inc/global.inc.php';
  8. $this_section = SECTION_PLATFORM_ADMIN;
  9. api_protect_admin_script();
  10. Skill::isAllowed();
  11. //Adds the JS needed to use the jqgrid
  12. $htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
  13. $htmlHeadXtra[] = api_get_js('jqueryui-touch-punch/jquery.ui.touch-punch.min.js');
  14. $htmlHeadXtra[] = api_get_js('skills.js');
  15. $skill = new Skill();
  16. $type = 'edit'; //edit
  17. $tree = $skill->getSkillsTree(null, null, true);
  18. $skill_visualizer = new SkillVisualizer($tree, $type);
  19. $html = $skill_visualizer->return_html();
  20. $url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
  21. $tpl = new Template(null, false, false);
  22. $tpl->assign('url', $url);
  23. $tpl->assign('html', $html);
  24. $tpl->assign('skill_visualizer', $skill_visualizer);
  25. $tpl->assign('js', $skill_visualizer->return_js());
  26. $templateName = $tpl->get_template('skill/skill_tree.tpl');
  27. $content = $tpl->fetch($templateName);
  28. $tpl->assign('content', $content);
  29. $tpl->display_no_layout_template();