skills_wheel.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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_SOCIAL;
  11. if (api_get_setting('allow_skills_tool') != 'true') {
  12. api_not_allowed();
  13. }
  14. api_block_anonymous_users();
  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 = api_get_user_id();
  21. $skill_condition = '';
  22. if (isset($_GET['skill_id'])) {
  23. $skill_condition = '&skill_id='.intval($_GET['skill_id']);
  24. $tpl->assign('skill_id_to_load', $_GET['skill_id']);
  25. }
  26. $url = api_get_path(WEB_AJAX_PATH)."skill.ajax.php?a=get_skills_tree_json&load_user=$load_user";
  27. $tpl->assign('wheel_url', $url);
  28. $url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
  29. $tpl->assign('url', $url);
  30. $content = $tpl->fetch('default/skill/skill_wheel_student.tpl');
  31. $tpl->assign('content', $content);
  32. $tpl->display_no_layout_template();