From aee5ae8adb067109cc0613c0029bed5b06a12562 Mon Sep 17 00:00:00 2001 From: Olivier SECRET Date: Mon, 25 Jun 2018 11:48:15 +1000 Subject: [PATCH] add privacy provider to fix unit test failure --- classes/privacy/provider.php | 54 ++++++++++++++++++++++++++++++++++++ lang/en/auth_outage.php | 5 ++++ version.php | 2 +- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 classes/privacy/provider.php diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php new file mode 100644 index 0000000..9acaaba --- /dev/null +++ b/classes/privacy/provider.php @@ -0,0 +1,54 @@ +. +/** + * Privacy Subsystem implementation for auth_outage. + * + * @package auth_outage + * @copyright 2018 Olivier SECRET + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace auth_outage\privacy; + +defined('MOODLE_INTERNAL') || die(); + +use core_privacy\local\legacy_polyfill; + +/** + * Privacy provider for the authentication manual. + * + * @copyright 2018 Carlos Escobedo + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class provider implements + \core_privacy\local\metadata\null_provider { + + use legacy_polyfill; + + /** + * Get the language string identifier with the component's language + * file to explain why this plugin stores no data. + * + * This function is compatible with old php version. (Diff is the underscore '_' in the beginning) + * But the get_reason is still available because of the trait legacy_polyfill. + * + * @return string + */ + public static function _get_reason() { + return 'privacy:no_data_reason'; + } + +} diff --git a/lang/en/auth_outage.php b/lang/en/auth_outage.php index 7cd3d5e..23f0166 100644 --- a/lang/en/auth_outage.php +++ b/lang/en/auth_outage.php @@ -143,3 +143,8 @@ $string['title_help'] = 'A short title to for this outage. It will be displayed $string['warningdurationerrorinvalid'] = 'Warning duration must be positive.'; $string['warningduration'] = 'Warning duration'; $string['warningduration_help'] = 'How long before the start of the outage should the warning be displayed.'; + +/* + * Privacy provider (GDPR) + */ +$string["privacy:no_data_reason"] = "The 'auth outage' plugins doesn't store any personnel data."; diff --git a/version.php b/version.php index 9814fa8..5ae578a 100644 --- a/version.php +++ b/version.php @@ -28,7 +28,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = "auth_outage"; -$plugin->version = 2017071300; // The current plugin version (Date: YYYYMMDDXX). +$plugin->version = 2018062500; // The current plugin version (Date: YYYYMMDDXX). $plugin->release = '1.0.9'; // Human-readable release information. $plugin->requires = 2014051200; // Requires Moodle 2.7 or later. Moodle 3.0 or later recommended. $plugin->maturity = MATURITY_STABLE; // Suitable for PRODUCTION environments!