skills_wheel.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
  20. $htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
  21. $tpl = $app['template'];
  22. $load_user = 0;
  23. if (isset($_GET['load_user'])) {
  24. $load_user = 1;
  25. }
  26. $skill_condition = '';
  27. if (isset($_GET['skill_id'])) {
  28. $skill_condition = '&skill_id='.intval($_GET['skill_id']);
  29. $tpl->assign('skill_id_to_load', $_GET['skill_id']);
  30. }
  31. $url = api_get_path(WEB_AJAX_PATH)."skill.ajax.php?a=get_skills_tree_json&load_user=$load_user";
  32. $tpl->assign('wheel_url', $url);
  33. $url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
  34. $tpl->assign('url', $url);
  35. $content = $tpl->fetch('default/skill/skill_wheel.tpl');
  36. $tpl->assign('content', $content);
  37. $tpl->display_no_layout_template();