diff options
author | Jean-Michel Vedrine <vedrine@vedrine.org> | 2018-05-09 18:26:58 +0200 |
---|---|---|
committer | Jean-Michel Vedrine <vedrine@vedrine.org> | 2018-05-18 13:10:43 +0200 |
commit | 664753b7873f3dcc200f255bfb5a7535424f9eca (patch) | |
tree | 7edb2c8da0637644d371aa02176dd0d5f9bd0151 | |
parent | 1c09cf98ff1220e49de214e594707edf9b72c335 (diff) |
Add privacy provider
-rw-r--r-- | classes/privacy/provider.php | 50 | ||||
-rw-r--r-- | lang/en/qtype_algebra.php | 1 | ||||
-rw-r--r-- | phpunit.xml | 15 | ||||
-rw-r--r-- | version.php | 4 |
4 files changed, 65 insertions, 5 deletions
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 @@ +<?php +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see <http://www.gnu.org/licenses/>. + +/** + * 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" > <php> <!--<const name="PHPUNIT_LONGTEST" value="1"/> uncomment to execute also slow or otherwise expensive tests--> - <const name="PHPUNIT_SEQUENCE_START" value="139000"/> + <const name="PHPUNIT_SEQUENCE_START" value="172000"/> <!--Following constants instruct tests to fetch external test files from alternative location or skip tests if empty, clone https://github.com/moodlehq/moodle-exttests to local web server--> <!--<const name="TEST_EXTERNAL_FILES_HTTP_URL" value="http://download.moodle.org/unittest"/> uncomment and alter to fetch external test files from alternative location--> @@ -29,9 +30,17 @@ <testsuites> - <testsuite name="\question\type\algebra"> + <testsuite name="question_type_algebra_testsuite"> <directory suffix="_test.php">.</directory> </testsuite> </testsuites> + <filter> + <whitelist processUncoveredFilesFromWhitelist="false"> + <directory suffix=".php">.</directory> + <exclude> + <directory suffix="_test.php">.</directory> + </exclude> + </whitelist> + </filter> </phpunit> 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; |