From 664753b7873f3dcc200f255bfb5a7535424f9eca Mon Sep 17 00:00:00 2001 From: Jean-Michel Vedrine Date: Wed, 9 May 2018 18:26:58 +0200 Subject: Add privacy provider --- classes/privacy/provider.php | 50 ++++++++++++++++++++++++++++++++++++++++++++ lang/en/qtype_algebra.php | 1 + phpunit.xml | 15 ++++++++++--- version.php | 4 ++-- 4 files changed, 65 insertions(+), 5 deletions(-) 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..65b0a17 --- /dev/null +++ b/classes/privacy/provider.php @@ -0,0 +1,50 @@ +. + +/** + * Privacy main class. + * + * @package qtype_algebra + * @copyright 2018 Jean-Michel vedrine + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace qtype_algebra\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy main class. + * + * @package qtype_algebra + * @copyright 2018 Jean-Michel Vedrine + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class provider implements \core_privacy\local\metadata\null_provider { + + // To provide php 5.6 (33_STABLE) and up support. + use \core_privacy\local\legacy_polyfill; + + /** + * 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/lang/en/qtype_algebra.php b/lang/en/qtype_algebra.php index 8c8ed2e..c1b6f6c 100644 --- a/lang/en/qtype_algebra.php +++ b/lang/en/qtype_algebra.php @@ -136,6 +136,7 @@ $string['pluginname_link'] = 'question/type/algebra'; $string['pluginname_help'] = 'Student enter a formula as response that include one or more variables. Correctness is evaluted using one of 3 differents methods'; $string['pluginname'] = 'Algebra'; $string['pluginnamesummary'] = 'Student enter a formula that can include one or more variables. Correctness is evaluted using one of 3 differents methods.'; +$string['privacy:metadata'] = 'The Algebra question type plugin does not store any personal data.'; $string['host'] = 'Host url of SAGE server'; $string['port'] = 'Port of SAGE server'; $string['uri'] = 'uri of SAGE server'; diff --git a/phpunit.xml b/phpunit.xml index 593f644..111f963 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -13,14 +13,15 @@ stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" - strict="false" + beStrictAboutTestsThatDoNotTestAnything="false" + beStrictAboutOutputDuringTests="true" printerClass="Hint_ResultPrinter" testSuiteLoaderClass="phpunit_autoloader" > - + @@ -29,9 +30,17 @@ - + . + + + . + + . + + + diff --git a/version.php b/version.php index a0cbc70..2d445da 100644 --- a/version.php +++ b/version.php @@ -23,8 +23,8 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'qtype_algebra'; -$plugin->version = 2018020400; +$plugin->version = 2018020401; $plugin->requires = 2013050100; -$plugin->release = '1.7 for Moodle 2.8, ... 3.5'; +$plugin->release = '1.71 for Moodle 2.8, ... 3.5'; $plugin->maturity = MATURITY_STABLE; -- cgit v1.2.3