From 737ab6eff805e8a8e902fdd6252858373abcccd2 Mon Sep 17 00:00:00 2001 From: Zig Tan Date: Mon, 9 Apr 2018 10:47:57 +0800 Subject: [PATCH] MDL-61881 report_stats: Implement null privacy provider --- report/stats/classes/privacy/provider.php | 46 +++++++++++++++++++++++ report/stats/lang/en/report_stats.php | 1 + 2 files changed, 47 insertions(+) create mode 100644 report/stats/classes/privacy/provider.php diff --git a/report/stats/classes/privacy/provider.php b/report/stats/classes/privacy/provider.php new file mode 100644 index 00000000000..72cd05a3e09 --- /dev/null +++ b/report/stats/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for report_stats. + * + * @package report_stats + * @copyright 2018 Zig Tan + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace report_stats\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for report_stats implementing null_provider. + * + * @copyright 2018 Zig Tan + * @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'; + } +} \ No newline at end of file diff --git a/report/stats/lang/en/report_stats.php b/report/stats/lang/en/report_stats.php index 1ee3034b9c7..947981d7e09 100644 --- a/report/stats/lang/en/report_stats.php +++ b/report/stats/lang/en/report_stats.php @@ -31,3 +31,4 @@ $string['page-report-stats-x'] = 'Any statistics report'; $string['page-report-stats-index'] = 'Course statistics report'; $string['page-report-stats-user'] = 'User course statistics report'; $string['stats:view'] = 'View course statistics report'; +$string['privacy:metadata'] = 'The report_stats plugin does not store any personal data.';