skills_tree.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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_MYPROFILE;
  9. api_block_anonymous_users();
  10. if (api_get_setting('allow_skills_tool') !== 'true') {
  11. api_not_allowed();
  12. }
  13. //Adds the JS needed to use the jqgrid
  14. $htmlHeadXtra[] = api_get_jqgrid_js();
  15. $htmlHeadXtra[] = api_get_js('jqueryui-touch-punch/jquery.ui.touch-punch.min.js');
  16. $htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
  17. $htmlHeadXtra[] = api_get_js('skills.js');
  18. $skill = new Skill();
  19. $type = 'read'; //edit
  20. $tree = $skill->get_skills_tree(api_get_user_id(), null, true);
  21. $skill_visualizer = new SkillVisualizer($tree, $type);
  22. $url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
  23. $tpl = new Template(null, false, false);
  24. $tpl->assign('url', $url);
  25. $tpl->assign('skill_visualizer', $skill_visualizer);
  26. $template = $tpl->get_template('skill/skill_tree_student.tpl');
  27. $content = $tpl->fetch($template);
  28. $tpl->assign('content', $content);
  29. $tpl->display_no_layout_template();