skills_wheel.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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_PLATFORM_ADMIN;
  11. api_protect_admin_script();
  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_js('d3/d3.v2.min.js');
  17. $htmlHeadXtra[] = api_get_js('d3/colorbrewer.js');
  18. $htmlHeadXtra[] = api_get_js('d3/jquery.xcolor.js');
  19. $tpl = $app['template'];
  20. $load_user = 0;
  21. if (isset($_GET['load_user'])) {
  22. $load_user = 1;
  23. }
  24. $skill_condition = '';
  25. if (isset($_GET['skill_id'])) {
  26. $skill_condition = '&skill_id='.intval($_GET['skill_id']);
  27. $tpl->assign('skill_id_to_load', $_GET['skill_id']);
  28. }
  29. $url = api_get_path(WEB_AJAX_PATH)."skill.ajax.php?a=get_skills_tree_json&load_user=$load_user";
  30. $tpl->assign('wheel_url', $url);
  31. $url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
  32. $tpl->assign('url', $url);
  33. $content = $tpl->fetch('default/skill/skill_wheel.tpl');
  34. $tpl->assign('content', $content);
  35. $tpl->display_no_layout_template();