class.php 743 B

1234567891011121314151617181920212223242526
  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 __DIR__.'/../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)."badges/{$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);