class.php 728 B

12345678910111213141516171819202122232425
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Show information about the OpenBadge class
  5. * @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
  6. * @package chamilo.badge
  7. */
  8. header('Content-Type: application/json');
  9. require_once '../inc/global.inc.php';
  10. $skillId = isset($_GET['id']) ? intval($_GET['id']) : 0;
  11. $objSkill = new Skill();
  12. $skill = $objSkill->get($skillId);
  13. $json = array(
  14. 'name' => $skill['name'],
  15. 'description' => $skill['description'],
  16. 'image' => api_get_path(WEB_UPLOAD_PATH) . $skill['icon'],
  17. 'criteria' => api_get_path(WEB_CODE_PATH) . "badge/criteria.php?id=$skillId",
  18. 'issuer' => api_get_path(WEB_CODE_PATH) . "badge/issuer.php",
  19. );
  20. echo json_encode($json);