You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
777 B
30 lines
777 B
|
11 years ago
|
<?php
|
||
|
|
/* For licensing terms, see /license.txt */
|
||
|
9 years ago
|
|
||
|
11 years ago
|
/**
|
||
|
8 years ago
|
* Show information about the OpenBadge class.
|
||
|
|
*
|
||
|
11 years ago
|
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
|
||
|
|
*/
|
||
|
9 years ago
|
require_once __DIR__.'/../inc/global.inc.php';
|
||
|
11 years ago
|
|
||
|
7 years ago
|
$skillId = isset($_GET['id']) ? (int) $_GET['id'] : 0;
|
||
|
4 years ago
|
|
||
|
4 years ago
|
$objSkill = new SkillModel();
|
||
|
11 years ago
|
$skill = $objSkill->get($skillId);
|
||
|
7 years ago
|
$json = [];
|
||
|
11 years ago
|
|
||
|
7 years ago
|
if ($skill) {
|
||
|
|
$json = [
|
||
|
|
'name' => $skill['name'],
|
||
|
|
'description' => $skill['description'],
|
||
|
|
'image' => api_get_path(WEB_UPLOAD_PATH)."badges/{$skill['icon']}",
|
||
|
3 years ago
|
'criteria' => api_get_path(WEB_CODE_PATH)."skills/criteria.php?id=$skillId",
|
||
|
|
'issuer' => api_get_path(WEB_CODE_PATH).'skills/issuer.php',
|
||
|
7 years ago
|
];
|
||
|
|
}
|
||
|
11 years ago
|
|
||
|
7 years ago
|
header('Content-Type: application/json');
|
||
|
|
|
||
|
11 years ago
|
echo json_encode($json);
|