Skip to content

Commit 3c4be4e

Browse files
author
David Monllao
committed
Merge branch 'MDL-61858_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE
2 parents 2489791 + e0700b4 commit 3c4be4e

File tree

8 files changed

+64
-0
lines changed

8 files changed

+64
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
// This file is part of Moodle - http://moodle.org/
3+
//
4+
// Moodle is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// Moodle is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16+
17+
/**
18+
* Privacy Subsystem implementation for tool_phpunit.
19+
*
20+
* @package tool_phpunit
21+
* @copyright 2018 Mark Nelson <markn@moodle.com>
22+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23+
*/
24+
25+
namespace tool_phpunit\privacy;
26+
27+
defined('MOODLE_INTERNAL') || die();
28+
29+
/**
30+
* Privacy Subsystem for tool_phpunit implementing null_provider.
31+
*
32+
* @copyright 2018 Mark Nelson <markn@moodle.com>
33+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34+
*/
35+
class provider implements \core_privacy\local\metadata\null_provider {
36+
37+
/**
38+
* Get the language string identifier with the component's language
39+
* file to explain why this plugin stores no data.
40+
*
41+
* @return string
42+
*/
43+
public static function get_reason() : string {
44+
return 'privacy:metadata';
45+
}
46+
}

grade/grading/form/guide/classes/privacy/provider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3838
*/
3939
class provider implements
40+
\core_privacy\local\metadata\provider,
4041
\core_privacy\local\request\user_preference_provider {
4142

4243
/**

portfolio/boxnet/classes/privacy/provider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
class provider implements
3737
// This portfolio plugin does not store any data itself.
3838
// It has no database tables, and it purely acts as a conduit, sending data externally.
39+
\core_privacy\local\metadata\provider,
3940
\core_portfolio\privacy\portfolio_provider {
4041

4142
/**

portfolio/flickr/classes/privacy/provider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
class provider implements
3737
// This portfolio plugin does not store any data itself.
3838
// It has no database tables, and it purely acts as a conduit, sending data externally.
39+
\core_privacy\local\metadata\provider,
3940
\core_portfolio\privacy\portfolio_provider {
4041

4142
/**

portfolio/googledocs/classes/privacy/provider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
class provider implements
3737
// This portfolio plugin does not store any data itself.
3838
// It has no database tables, and it purely acts as a conduit, sending data externally.
39+
\core_privacy\local\metadata\provider,
3940
\core_portfolio\privacy\portfolio_provider {
4041

4142
/**

portfolio/mahara/classes/privacy/provider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
class provider implements
3737
// This portfolio plugin does not store any data itself.
3838
// It has no database tables, and it purely acts as a conduit, sending data externally.
39+
\core_privacy\local\metadata\provider,
3940
\core_portfolio\privacy\portfolio_provider {
4041

4142
/**

portfolio/picasa/classes/privacy/provider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
class provider implements
3737
// This portfolio plugin does not store any data itself.
3838
// It has no database tables, and it purely acts as a conduit, sending data externally.
39+
\core_privacy\local\metadata\provider,
3940
\core_portfolio\privacy\portfolio_provider {
4041

4142
/**

privacy/tests/provider_test.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,18 @@ public function test_metadata_provider($component, $classname) {
163163
}
164164
}
165165

166+
/**
167+
* Test that all providers implement some form of compliant provider.
168+
*
169+
* @dataProvider get_component_list
170+
* @param string $component frankenstyle component name, e.g. 'mod_assign'
171+
* @param string $classname the fully qualified provider classname
172+
*/
173+
public function test_all_providers_compliant($component, $classname) {
174+
$manager = new manager();
175+
$this->assertTrue($manager->component_is_compliant($component));
176+
}
177+
166178
/**
167179
* Data provider for the metadata\provider tests.
168180
*

0 commit comments

Comments
 (0)