skills_tree.php 1015 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * @package chamilo.admin
  5. */
  6. // Language files that need to be included.
  7. $language_file = array('admin');
  8. $cidReset = true;
  9. require_once '../inc/global.inc.php';
  10. $this_section = SECTION_MYPROFILE;
  11. api_block_anonymous_users();
  12. if (api_get_setting('allow_skills_tool') != 'true') {
  13. api_not_allowed();
  14. }
  15. //Adds the JS needed to use the jqgrid
  16. $htmlHeadXtra[] = api_get_jqgrid_js();
  17. $htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
  18. $htmlHeadXtra[] = api_get_js('skills.js');
  19. $skill = new Skill();
  20. $type = 'read'; //edit
  21. $tree = $skill->get_skills_tree(api_get_user_id(), null, true);
  22. $skill_visualizer = new SkillVisualizer($tree, $type);
  23. $url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
  24. $tpl = $app['template'];
  25. $tpl->assign('url', $url);
  26. $tpl->assign('skill_visualizer', $skill_visualizer);
  27. $content = $tpl->fetch('default/skill/skill_tree_student.tpl');
  28. $tpl->assign('content', $content);
  29. $tpl->display_no_layout_template();