Skip to content

Commit

Permalink
MDL-61407 question: Add null_writer for all behaviours
Browse files Browse the repository at this point in the history
Behaviours do not store any personal data.
Any contrib behaviour which does store personal data should utilise the
standard export interfaces as this subsystem will not call them directly.
  • Loading branch information
andrewnicols committed May 3, 2018
1 parent 84b5f66 commit a6a8ecc
Show file tree
Hide file tree
Showing 22 changed files with 518 additions and 1 deletion.
46 changes: 46 additions & 0 deletions question/behaviour/adaptive/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 Subsystem implementation for qbehaviour_adaptive.
*
* @package qbehaviour_adaptive
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace qbehaviour_adaptive\privacy;

defined('MOODLE_INTERNAL') || die();

/**
* Privacy Subsystem for qbehaviour_adaptive implementing null_provider.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @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() {
return 'privacy:metadata';
}
}
Expand Up @@ -32,6 +32,7 @@
$string['gradingdetailswithtotalpenalty'] = 'Marks for this submission: {$a->raw}/{$a->max}. This submission attracted a penalty of {$a->penalty}. Total penalties so far: {$a->totalpenalty}.';
$string['notcomplete'] = 'Not complete';
$string['pluginname'] = 'Adaptive mode';
$string['privacy:metadata'] = 'The Adaptive mode question behaviour plugin does not store any personal data.';

// Old strings these are currently only used in the unit tests, to verify that the new
// strings give the same results as the old strings.
Expand Down
46 changes: 46 additions & 0 deletions question/behaviour/adaptivenopenalty/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 Subsystem implementation for qbehaviour_adaptivenopenalty.
*
* @package qbehaviour_adaptivenopenalty
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace qbehaviour_adaptivenopenalty\privacy;

defined('MOODLE_INTERNAL') || die();

/**
* Privacy Subsystem for qbehaviour_adaptivenopenalty implementing null_provider.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @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() {
return 'privacy:metadata';
}
}
Expand Up @@ -24,3 +24,4 @@
*/

$string['pluginname'] = 'Adaptive mode (no penalties)';
$string['privacy:metadata'] = 'The Adaptive mode (no penalties) question behaviour plugin does not store any personal data.';
46 changes: 46 additions & 0 deletions question/behaviour/deferredcbm/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 Subsystem implementation for qbehaviour_deferredcbm.
*
* @package qbehaviour_deferredcbm
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace qbehaviour_deferredcbm\privacy;

defined('MOODLE_INTERNAL') || die();

/**
* Privacy Subsystem for qbehaviour_deferredcbm implementing null_provider.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @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() {
return 'privacy:metadata';
}
}
Expand Up @@ -66,6 +66,7 @@
$string['noquestions'] = 'No responses';
$string['overconfident'] = 'over-confident';
$string['pluginname'] = 'Deferred feedback with CBM';
$string['privacy:metadata'] = 'The Deferred feedback with CBM question behaviour plugin does not store any personal data.';
$string['slightlyoverconfident'] = 'a bit over-confident';
$string['slightlyunderconfident'] = 'a bit under-confident';
$string['underconfident'] = 'under-confident';
Expand Down
46 changes: 46 additions & 0 deletions question/behaviour/deferredfeedback/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 Subsystem implementation for qbehaviour_deferredfeedback.
*
* @package qbehaviour_deferredfeedback
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace qbehaviour_deferredfeedback\privacy;

defined('MOODLE_INTERNAL') || die();

/**
* Privacy Subsystem for qbehaviour_deferredfeedback implementing null_provider.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @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() {
return 'privacy:metadata';
}
}
Expand Up @@ -24,3 +24,4 @@
*/

$string['pluginname'] = 'Deferred feedback';
$string['privacy:metadata'] = 'The Deferred feedback behaviour plugin does not store any personal data.';
46 changes: 46 additions & 0 deletions question/behaviour/immediatecbm/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 Subsystem implementation for qbehaviour_immediatecbm.
*
* @package qbehaviour_immediatecbm
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace qbehaviour_immediatecbm\privacy;

defined('MOODLE_INTERNAL') || die();

/**
* Privacy Subsystem for qbehaviour_immediatecbm implementing null_provider.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @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() {
return 'privacy:metadata';
}
}
Expand Up @@ -25,3 +25,4 @@

$string['pleaseselectacertainty'] = 'Please select a certainty.';
$string['pluginname'] = 'Immediate feedback with CBM';
$string['privacy:metadata'] = 'The Immediate feedback with CBM question behaviour plugin does not store any personal data.';
46 changes: 46 additions & 0 deletions question/behaviour/immediatefeedback/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 Subsystem implementation for qbehaviour_immediatefeedback.
*
* @package qbehaviour_immediatefeedback
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace qbehaviour_immediatefeedback\privacy;

defined('MOODLE_INTERNAL') || die();

/**
* Privacy Subsystem for qbehaviour_immediatefeedback implementing null_provider.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @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() {
return 'privacy:metadata';
}
}
Expand Up @@ -25,3 +25,4 @@

$string['notcomplete'] = 'Not complete';
$string['pluginname'] = 'Immediate feedback';
$string['privacy:metadata'] = 'The Immediate feedback question behaviour plugin does not store any personal data.';
46 changes: 46 additions & 0 deletions question/behaviour/informationitem/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 Subsystem implementation for qbehaviour_informationitem.
*
* @package qbehaviour_informationitem
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace qbehaviour_informationitem\privacy;

defined('MOODLE_INTERNAL') || die();

/**
* Privacy Subsystem for qbehaviour_informationitem implementing null_provider.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @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() {
return 'privacy:metadata';
}
}
Expand Up @@ -24,4 +24,5 @@
*/

$string['pluginname'] = 'Behaviour for information items';
$string['seen'] = 'Seen';
$string['privacy:metadata'] = 'The Information items question behaviour plugin does not store any personal data.';
$string['seen'] = 'Seen';

0 comments on commit a6a8ecc

Please sign in to comment.