. /** * External Web Service Template * * @package localws_evl * @copyright 2011 Moodle Pty Ltd (http://moodle.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once($CFG->libdir . "/externallib.php"); class block_escola_modelo_external extends external_api { public static function get_usage_statistics() { global $USER; return '{"cursos": "10", "alunos":"20", "certificados":"12"}'; } public static function get_usage_statistics_parameters() { return new external_function_parameters( array() ); } public static function get_usage_statistics_returns() { return new external_value(PARAM_TEXT, 'JSON with statistics of this installation'); } }