Skip to content

Commit

Permalink
Merge pull request #18 from olive007/master
Browse files Browse the repository at this point in the history
Fix unit test "provider_testcase" privacy/tests/provider_test.php
  • Loading branch information
bmbrands authored Apr 3, 2019
2 parents db0b7e9 + c70dd7b commit f1097cb
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ moodle-local_analytics

Release notes:

version: 2018092400

- Fixing unit test "provider_testcase" privacy/tests/provider_test.php

Add privacy provider with legacy_polyfill to say compatible with old version

version: 2017031300

- Updated to work with Moodle versions 3.0, 3.1 and 3.2
Expand Down
49 changes: 49 additions & 0 deletions classes/privacy/provider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?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 local_analytics.
*
* @package local_analytics
* @copyright 2018 Olivier SECRET <olivier.secret@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace local_analytics\privacy;

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

/**
* @copyright 2018 Olivier SECRET <olivier.secret@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements
\core_privacy\local\metadata\null_provider {

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.
*
* This function is compatible with old php version. (Diff is the underscore '_' in the beginning)
* But the get_reason is still available because of the trait legacy_polyfill.
*
* @return string
*/
public static function _get_reason() {
return 'privacy:no_data_reason';
}
}
4 changes: 4 additions & 0 deletions lang/en/local_analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@
$string['head'] = 'Header';
$string['topofbody'] = 'Top of body';
$string['footer'] = 'Footer';
/*
* GDPR compliant
*/
$string['privacy:no_data_reason'] = "The local analytics plugin doesn't store any personal data.";
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2017061300;
$plugin->version = 2018092400;
$plugin->requires = 2011033010;
$plugin->release = '1.5 (Build: 2017061300)';
$plugin->release = '1.6 (Build: 2018092400)';
$plugin->maturity = MATURITY_STABLE;
$plugin->component = 'local_analytics';

0 comments on commit f1097cb

Please sign in to comment.