MDL-57273 core: Exporters support custom formatting parameters

This commit is contained in:
Frederic Massart
2017-01-20 12:56:19 +08:00
committed by Damyon Wiese
parent 268beda8e9
commit 4bc68a416e
16 changed files with 334 additions and 30 deletions
@@ -24,6 +24,7 @@
namespace core_competency\external;
defined('MOODLE_INTERNAL') || die();
use context_system;
use core_user;
use renderer_base;
use stdClass;
@@ -94,6 +95,17 @@ class user_competency_exporter extends \core\external\persistent_exporter {
return (array) $result;
}
/**
* Get the format parameters for gradename.
*
* @return array
*/
protected function get_format_parameters_for_gradename() {
return [
'context' => context_system::instance(), // The system context is cached, so we can get it right away.
];
}
protected static function define_other_properties() {
return array(
'canrequestreview' => array(