From 80b0c733f27d33198fbc8406fe0fef42358aee59 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Sat, 7 Apr 2018 14:10:29 +0800 Subject: [PATCH] MDL-61407 qformat: Add null_writer for all qformats Questions formats do not store any personal data. Any contrib format which does store personal data should utilise the standard export interfaces as this subsystem will not call them directly. --- .../format/aiken/classes/privacy/provider.php | 46 +++++++++++++++++++ .../format/aiken/lang/en/qformat_aiken.php | 1 + .../classes/privacy/provider.php | 46 +++++++++++++++++++ .../lang/en/qformat_blackboard_six.php | 1 + .../examview/classes/privacy/provider.php | 46 +++++++++++++++++++ .../examview/lang/en/qformat_examview.php | 1 + .../format/gift/classes/privacy/provider.php | 46 +++++++++++++++++++ question/format/gift/lang/en/qformat_gift.php | 1 + .../missingword/classes/privacy/provider.php | 46 +++++++++++++++++++ .../lang/en/qformat_missingword.php | 1 + .../multianswer/classes/privacy/provider.php | 46 +++++++++++++++++++ .../lang/en/qformat_multianswer.php | 1 + .../format/webct/classes/privacy/provider.php | 46 +++++++++++++++++++ .../format/webct/lang/en/qformat_webct.php | 1 + .../format/xhtml/classes/privacy/provider.php | 46 +++++++++++++++++++ .../format/xhtml/lang/en/qformat_xhtml.php | 1 + .../format/xml/classes/privacy/provider.php | 46 +++++++++++++++++++ question/format/xml/lang/en/qformat_xml.php | 1 + 18 files changed, 423 insertions(+) create mode 100644 question/format/aiken/classes/privacy/provider.php create mode 100644 question/format/blackboard_six/classes/privacy/provider.php create mode 100644 question/format/examview/classes/privacy/provider.php create mode 100644 question/format/gift/classes/privacy/provider.php create mode 100644 question/format/missingword/classes/privacy/provider.php create mode 100644 question/format/multianswer/classes/privacy/provider.php create mode 100644 question/format/webct/classes/privacy/provider.php create mode 100644 question/format/xhtml/classes/privacy/provider.php create mode 100644 question/format/xml/classes/privacy/provider.php diff --git a/question/format/aiken/classes/privacy/provider.php b/question/format/aiken/classes/privacy/provider.php new file mode 100644 index 00000000000..e67322886ab --- /dev/null +++ b/question/format/aiken/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for qformat_aiken. + * + * @package qformat_aiken + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qformat_aiken\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for qformat_aiken implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @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'; + } +} diff --git a/question/format/aiken/lang/en/qformat_aiken.php b/question/format/aiken/lang/en/qformat_aiken.php index 9fc5ede4b39..44cf96f17de 100644 --- a/question/format/aiken/lang/en/qformat_aiken.php +++ b/question/format/aiken/lang/en/qformat_aiken.php @@ -25,3 +25,4 @@ $string['pluginname'] = 'Aiken format'; $string['pluginname_help'] = 'This is a simple format for importing multiple choice questions from a text file.'; $string['pluginname_link'] = 'qformat/aiken'; +$string['privacy:metadata'] = 'The Aiken question format plugin does not store any personal data.'; diff --git a/question/format/blackboard_six/classes/privacy/provider.php b/question/format/blackboard_six/classes/privacy/provider.php new file mode 100644 index 00000000000..d488a1a0ff3 --- /dev/null +++ b/question/format/blackboard_six/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for qformat_blackboard_six. + * + * @package qformat_blackboard_six + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qformat_blackboard_six\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for qformat_blackboard_six implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @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'; + } +} diff --git a/question/format/blackboard_six/lang/en/qformat_blackboard_six.php b/question/format/blackboard_six/lang/en/qformat_blackboard_six.php index c87aa2cd5b9..99112dd7e50 100644 --- a/question/format/blackboard_six/lang/en/qformat_blackboard_six.php +++ b/question/format/blackboard_six/lang/en/qformat_blackboard_six.php @@ -31,4 +31,5 @@ $string['importedcategory'] = 'Imported category {$a}'; $string['notenoughtsubans'] = 'Unable to import matching question \'{$a}\' because a matching question must comprise at least two questions and three answers.'; $string['pluginname'] = 'Blackboard'; $string['pluginname_help'] = 'Blackboard format enables questions saved in all Blackboard export formats to be imported via a dat or zip file. For zip files, images import is supported.'; +$string['privacy:metadata'] = 'The Blackbard question format plugin does not store any personal data.'; $string['unhandledpresblock'] = 'Unhandled presentation block'; diff --git a/question/format/examview/classes/privacy/provider.php b/question/format/examview/classes/privacy/provider.php new file mode 100644 index 00000000000..98e1d0bf58d --- /dev/null +++ b/question/format/examview/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for qformat_examview. + * + * @package qformat_examview + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qformat_examview\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for qformat_examview implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @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'; + } +} diff --git a/question/format/examview/lang/en/qformat_examview.php b/question/format/examview/lang/en/qformat_examview.php index ce51ff1b71d..f40b151644d 100644 --- a/question/format/examview/lang/en/qformat_examview.php +++ b/question/format/examview/lang/en/qformat_examview.php @@ -24,3 +24,4 @@ $string['pluginname'] = 'Examview'; $string['pluginname_help'] = 'Examview format enables the import of questions from Examview 4 XML files. For newer versions of Examview, Blackboard format may be used.'; +$string['privacy:metadata'] = 'The Examview question format plugin does not store any personal data.'; diff --git a/question/format/gift/classes/privacy/provider.php b/question/format/gift/classes/privacy/provider.php new file mode 100644 index 00000000000..84029201bef --- /dev/null +++ b/question/format/gift/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for qformat_gift. + * + * @package qformat_gift + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qformat_gift\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for qformat_gift implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @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'; + } +} diff --git a/question/format/gift/lang/en/qformat_gift.php b/question/format/gift/lang/en/qformat_gift.php index f0ccd6020ce..6bad7cbaa8d 100644 --- a/question/format/gift/lang/en/qformat_gift.php +++ b/question/format/gift/lang/en/qformat_gift.php @@ -34,3 +34,4 @@ $string['nohandler'] = 'No handler for question type {$a}'; $string['pluginname'] = 'Gift format'; $string['pluginname_help'] = 'Gift format enables multiple-choice, true-false, short answer, matching, missing word, numerical and essay questions to be imported or exported via text file.'; $string['pluginname_link'] = 'qformat/gift'; +$string['privacy:metadata'] = 'The Gift question format plugin does not store any personal data.'; diff --git a/question/format/missingword/classes/privacy/provider.php b/question/format/missingword/classes/privacy/provider.php new file mode 100644 index 00000000000..89e7ee113b2 --- /dev/null +++ b/question/format/missingword/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for qformat_missingword. + * + * @package qformat_missingword + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qformat_missingword\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for qformat_missingword implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @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'; + } +} diff --git a/question/format/missingword/lang/en/qformat_missingword.php b/question/format/missingword/lang/en/qformat_missingword.php index e6b66a9660d..f468d311126 100644 --- a/question/format/missingword/lang/en/qformat_missingword.php +++ b/question/format/missingword/lang/en/qformat_missingword.php @@ -28,3 +28,4 @@ $string['pluginname_link'] = 'Missing word format'; $string['beginanswernotfound'] = 'Could not find a required "{" character in imported file content.'; $string['endanswernotfound'] = 'Could not find a required "}" character in imported file content.'; $string['noanswerfound'] = 'No answers found in question'; +$string['privacy:metadata'] = 'The Missing word question format plugin does not store any personal data.'; diff --git a/question/format/multianswer/classes/privacy/provider.php b/question/format/multianswer/classes/privacy/provider.php new file mode 100644 index 00000000000..ead533712e9 --- /dev/null +++ b/question/format/multianswer/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for qformat_multianswer. + * + * @package qformat_multianswer + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qformat_multianswer\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for qformat_multianswer implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @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'; + } +} diff --git a/question/format/multianswer/lang/en/qformat_multianswer.php b/question/format/multianswer/lang/en/qformat_multianswer.php index 4df7fecd2f3..48d4e2c439e 100644 --- a/question/format/multianswer/lang/en/qformat_multianswer.php +++ b/question/format/multianswer/lang/en/qformat_multianswer.php @@ -25,3 +25,4 @@ $string['pluginname'] = 'Embedded answers (Cloze)'; $string['pluginname_help'] = 'Embedded answers (Cloze) format enables the import of a passage of text with questions such as multiple-choice and short answer embedded within it.'; $string['pluginname_link'] = 'question/type/multianswer'; +$string['privacy:metadata'] = 'The Embedded answers question plugin does not store any personal data.'; diff --git a/question/format/webct/classes/privacy/provider.php b/question/format/webct/classes/privacy/provider.php new file mode 100644 index 00000000000..3d6446eeb09 --- /dev/null +++ b/question/format/webct/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for qformat_webct. + * + * @package qformat_webct + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qformat_webct\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for qformat_webct implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @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'; + } +} diff --git a/question/format/webct/lang/en/qformat_webct.php b/question/format/webct/lang/en/qformat_webct.php index f79a98eae49..96a52d6dafc 100644 --- a/question/format/webct/lang/en/qformat_webct.php +++ b/question/format/webct/lang/en/qformat_webct.php @@ -28,6 +28,7 @@ $string['missingquestion'] = 'Missing question label after line {$a}'; $string['pluginname'] = 'WebCT format'; $string['pluginname_help'] = 'WebCT format enables multiple-choice and short answer questions saved in WebCT\'s text-based format to be imported.'; $string['pluginname_link'] = 'qformat/webct'; +$string['privacy:metadata'] = 'The WebCT question format plugin does not store any personal data.'; $string['questionnametoolong'] = 'Question name too long at line {$a} (255 char. max). It has been truncated.'; $string['unknowntype'] = 'Unknown question type after line {$a}'; $string['warningsdetected'] = '{$a} warning(s) detected'; diff --git a/question/format/xhtml/classes/privacy/provider.php b/question/format/xhtml/classes/privacy/provider.php new file mode 100644 index 00000000000..0bc69a2176c --- /dev/null +++ b/question/format/xhtml/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for qformat_xhtml. + * + * @package qformat_xhtml + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qformat_xhtml\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for qformat_xhtml implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @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'; + } +} diff --git a/question/format/xhtml/lang/en/qformat_xhtml.php b/question/format/xhtml/lang/en/qformat_xhtml.php index 32d464bd5bb..aac94bb6cc7 100644 --- a/question/format/xhtml/lang/en/qformat_xhtml.php +++ b/question/format/xhtml/lang/en/qformat_xhtml.php @@ -25,3 +25,4 @@ $string['pluginname'] = 'XHTML format'; $string['pluginname_help'] = 'XHTML format enables all questions in the category to be exported to a single page of strict XHTML for possible use in another application.'; $string['pluginname_link'] = 'qformat/xhtml'; +$string['privacy:metadata'] = 'The XHTML question format plugin does not store any personal data.'; diff --git a/question/format/xml/classes/privacy/provider.php b/question/format/xml/classes/privacy/provider.php new file mode 100644 index 00000000000..727edb4c2ac --- /dev/null +++ b/question/format/xml/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for qformat_xml. + * + * @package qformat_xml + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qformat_xml\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for qformat_xml implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @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'; + } +} diff --git a/question/format/xml/lang/en/qformat_xml.php b/question/format/xml/lang/en/qformat_xml.php index 04b9c6cd36d..57fb5549174 100644 --- a/question/format/xml/lang/en/qformat_xml.php +++ b/question/format/xml/lang/en/qformat_xml.php @@ -26,6 +26,7 @@ $string['invalidxml'] = 'Invalid XML file - string expected (use CDATA?)'; $string['pluginname'] = 'Moodle XML format'; $string['pluginname_help'] = 'This is a Moodle-specific format for importing and exporting questions.'; $string['pluginname_link'] = 'qformat/xml'; +$string['privacy:metadata'] = 'The XML question format plugin does not store any personal data.'; $string['truefalseimporterror'] = 'Warning: The true/false question \'{$a->questiontext}\' could not be imported properly. It was not clear whether the correct answer is true or false. The question has been imported assuming that the answer is \'{$a->answer}\'. If this is not correct, you will need to edit the question.'; $string['unsupportedexport'] = 'Question type {$a} is not supported by XML export'; $string['xmlimportnoname'] = 'Missing question name in XML file';