From d6b5be41d4b59e4ea3605fee974f7767900babea Mon Sep 17 00:00:00 2001 From: Shamim Rezaie Date: Mon, 30 Apr 2018 15:39:00 +1000 Subject: [PATCH] MDL-62231 block_recent_activity: Implement null provider for the block --- .../classes/privacy/provider.php | 47 +++++++++++++++++++ .../lang/en/block_recent_activity.php | 1 + 2 files changed, 48 insertions(+) create mode 100644 blocks/recent_activity/classes/privacy/provider.php diff --git a/blocks/recent_activity/classes/privacy/provider.php b/blocks/recent_activity/classes/privacy/provider.php new file mode 100644 index 00000000000..240af61bcbd --- /dev/null +++ b/blocks/recent_activity/classes/privacy/provider.php @@ -0,0 +1,47 @@ +. + +/** + * Privacy subsystem implementation for block_recent_activity. + * + * @package block_recent_activity + * @category privacy + * @copyright 2018 Shamim Rezaie + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace block_recent_activity\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * The block_recent_activity does not keep any data for more than COURSE_MAX_RECENT_PERIOD. + * + * @copyright 2018 Shamim Rezaie + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class provider implements \core_privacy\local\metadata\null_provider { + + /** + * Get the language string identifier with the component's language + * file to explain why this plugin stores no data. + * + * @return string + */ + public static function get_reason() { + return 'privacy:metadata'; + } +} diff --git a/blocks/recent_activity/lang/en/block_recent_activity.php b/blocks/recent_activity/lang/en/block_recent_activity.php index f7d1333978a..3f6eadb60fa 100644 --- a/blocks/recent_activity/lang/en/block_recent_activity.php +++ b/blocks/recent_activity/lang/en/block_recent_activity.php @@ -24,6 +24,7 @@ */ $string['pluginname'] = 'Recent activity'; +$string['privacy:metadata'] = 'The recent activity block contains a cache of data stored elsewhere in Moodle.'; $string['recent_activity:addinstance'] = 'Add a new recent activity block'; $string['recent_activity:viewaddupdatemodule'] = 'View added and updated modules in recent activity block'; $string['recent_activity:viewdeletemodule'] = 'View deleted modules in recent activity block';