. /** * Display details of an issued badge with criteria and evidence * * @package core * @subpackage badges * @copyright 2012 onwards Totara Learning Solutions Ltd {@link http://www.totaralms.com/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Yuliya Bozhko */ require_once(dirname(dirname(__FILE__)) . '/config.php'); require_once($CFG->libdir . '/badgeslib.php'); $json = required_param('badge', PARAM_RAW); $PAGE->set_context(context_system::instance()); $output = $PAGE->get_renderer('core', 'badges'); $badge = new external_badge(unserialize($json)); $PAGE->set_url('/badges/external.php'); $PAGE->set_pagelayout('base'); $PAGE->set_title(get_string('issuedbadge', 'badges')); echo $OUTPUT->header(); echo $output->render($badge); echo $OUTPUT->footer();