Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
.
/**
* Serve Issuer JSON for related badge or default Issuer if no badge is defined.
*
* @package core
* @subpackage badges
* @copyright 2020 Sara Arjona
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('AJAX_SCRIPT', true);
define('NO_MOODLE_COOKIES', true); // No need for a session here.
require_once(__DIR__ . '/../config.php');
require_once($CFG->libdir . '/badgeslib.php');
$id = optional_param('id', null, PARAM_INT);
// OB specification version. If it's not defined, the site will be used as default.
$obversion = optional_param('obversion', badges_open_badges_backpack_api(), PARAM_INT);
if (empty($id)) {
// Get the default issuer for this site.
$json = badges_get_default_issuer();
} else {
// Get the issuer for this badge.
$badge = new badge($id);
if ($badge->status != BADGE_STATUS_INACTIVE) {
$json = $badge->get_badge_issuer($obversion);
} else {
// The badge doen't exist or not accessible for the users.
header("HTTP/1.0 410 Gone");
$badgeurl = new moodle_url('/badges/issuer_json.php', array('id' => $id));
$json = ['id' => $badgeurl->out()];
$json['error'] = get_string('error:relatedbadgedoesntexist', 'badges');
}
}
echo $OUTPUT->header();
echo json_encode($json);