From bc346cc34df422f9dedfbe7e09091049b085dcfb Mon Sep 17 00:00:00 2001 From: cescobedo Date: Tue, 10 Apr 2018 00:17:42 +0200 Subject: [PATCH] MDL-61916 format: Add privacy implementation for all format plugins None of the Course format plugins have any user preference or database table. They all implement the null provider. --- .../classes/privacy/provider.php | 41 +++++++++++++++++++ .../lang/en/format_singleactivity.php | 1 + .../social/classes/privacy/provider.php | 41 +++++++++++++++++++ .../format/social/lang/en/format_social.php | 1 + .../topics/classes/privacy/provider.php | 41 +++++++++++++++++++ .../format/topics/lang/en/format_topics.php | 1 + .../format/weeks/classes/privacy/provider.php | 41 +++++++++++++++++++ course/format/weeks/lang/en/format_weeks.php | 1 + 8 files changed, 168 insertions(+) create mode 100644 course/format/singleactivity/classes/privacy/provider.php create mode 100644 course/format/social/classes/privacy/provider.php create mode 100644 course/format/topics/classes/privacy/provider.php create mode 100644 course/format/weeks/classes/privacy/provider.php diff --git a/course/format/singleactivity/classes/privacy/provider.php b/course/format/singleactivity/classes/privacy/provider.php new file mode 100644 index 00000000000..fd37615f11a --- /dev/null +++ b/course/format/singleactivity/classes/privacy/provider.php @@ -0,0 +1,41 @@ +. +/** + * Privacy Subsystem implementation for format_singleactivity. + * + * @package format_singleactivity + * @copyright 2018 Carlos Escobedo + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +namespace format_singleactivity\privacy; +defined('MOODLE_INTERNAL') || die(); +/** + * Privacy Subsystem for format_singleactivity implementing null_provider. + * + * @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 { + /** + * 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() : string { + return 'privacy:metadata'; + } +} \ No newline at end of file diff --git a/course/format/singleactivity/lang/en/format_singleactivity.php b/course/format/singleactivity/lang/en/format_singleactivity.php index b6da590630b..8a219503d55 100644 --- a/course/format/singleactivity/lang/en/format_singleactivity.php +++ b/course/format/singleactivity/lang/en/format_singleactivity.php @@ -32,3 +32,4 @@ $string['orphanedwarning'] = 'These activities are unreachable by users!'; $string['pluginname'] = 'Single activity format'; $string['sectionname'] = ''; $string['warningchangeformat'] = 'When changing the existing course format to "Single activity" make sure that you removed all extra activities from the course including "Announcements". Note that sections structure may be modified.'; +$string['privacy:metadata'] = 'The Single activity format plugin does not store any personal data.'; diff --git a/course/format/social/classes/privacy/provider.php b/course/format/social/classes/privacy/provider.php new file mode 100644 index 00000000000..e5999ef6d25 --- /dev/null +++ b/course/format/social/classes/privacy/provider.php @@ -0,0 +1,41 @@ +. +/** + * Privacy Subsystem implementation for format_social. + * + * @package format_social + * @copyright 2018 Carlos Escobedo + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +namespace format_social\privacy; +defined('MOODLE_INTERNAL') || die(); +/** + * Privacy Subsystem for format_social implementing null_provider. + * + * @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 { + /** + * 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() : string { + return 'privacy:metadata'; + } +} \ No newline at end of file diff --git a/course/format/social/lang/en/format_social.php b/course/format/social/lang/en/format_social.php index ce6963ebb5f..46e82b94e23 100644 --- a/course/format/social/lang/en/format_social.php +++ b/course/format/social/lang/en/format_social.php @@ -27,3 +27,4 @@ $string['numberdiscussions'] = 'Number of discussions'; $string['numberdiscussions_help'] = 'This setting specifies how many discussions should be displayed.'; $string['pluginname'] = 'Social format'; $string['sectionname'] = 'section'; +$string['privacy:metadata'] = 'The Social format plugin does not store any personal data.'; diff --git a/course/format/topics/classes/privacy/provider.php b/course/format/topics/classes/privacy/provider.php new file mode 100644 index 00000000000..5f365c1dad0 --- /dev/null +++ b/course/format/topics/classes/privacy/provider.php @@ -0,0 +1,41 @@ +. +/** + * Privacy Subsystem implementation for format_topics. + * + * @package format_topics + * @copyright 2018 Carlos Escobedo + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +namespace format_topics\privacy; +defined('MOODLE_INTERNAL') || die(); +/** + * Privacy Subsystem for format_topics implementing null_provider. + * + * @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 { + /** + * 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() : string { + return 'privacy:metadata'; + } +} \ No newline at end of file diff --git a/course/format/topics/lang/en/format_topics.php b/course/format/topics/lang/en/format_topics.php index d9d9a15d478..0b7c16c369d 100644 --- a/course/format/topics/lang/en/format_topics.php +++ b/course/format/topics/lang/en/format_topics.php @@ -36,3 +36,4 @@ $string['page-course-view-topics'] = 'Any course main page in topics format'; $string['page-course-view-topics-x'] = 'Any course page in topics format'; $string['hidefromothers'] = 'Hide topic'; $string['showfromothers'] = 'Show topic'; +$string['privacy:metadata'] = 'The Topics format plugin does not store any personal data.'; diff --git a/course/format/weeks/classes/privacy/provider.php b/course/format/weeks/classes/privacy/provider.php new file mode 100644 index 00000000000..7e44c2741f9 --- /dev/null +++ b/course/format/weeks/classes/privacy/provider.php @@ -0,0 +1,41 @@ +. +/** + * Privacy Subsystem implementation for format_weeks. + * + * @package format_weeks + * @copyright 2018 Carlos Escobedo + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +namespace format_weeks\privacy; +defined('MOODLE_INTERNAL') || die(); +/** + * Privacy Subsystem for format_weeks implementing null_provider. + * + * @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 { + /** + * 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() : string { + return 'privacy:metadata'; + } +} \ No newline at end of file diff --git a/course/format/weeks/lang/en/format_weeks.php b/course/format/weeks/lang/en/format_weeks.php index 4f1eaa9c858..e73e477df02 100644 --- a/course/format/weeks/lang/en/format_weeks.php +++ b/course/format/weeks/lang/en/format_weeks.php @@ -38,3 +38,4 @@ $string['hidefromothers'] = 'Hide week'; $string['showfromothers'] = 'Show week'; $string['automaticenddate'] = 'Calculate the end date from the number of sections'; $string['automaticenddate_help'] = 'If enabled, the end date for the course will be automatically calculated from the number of sections and the course start date.'; +$string['privacy:metadata'] = 'The Weekly format plugin does not store any personal data.'; -- 2.43.0