Skip to content

Commit 540023b

Browse files
committed
Implement privacy API (null provider)
1 parent d02c924 commit 540023b

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

classes/privacy/provider.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
// This file is part of Moodle - https://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 <https://www.gnu.org/licenses/>.
16+
17+
namespace block_course_contents\privacy;
18+
19+
/**
20+
* Privacy API implementation for the Course contents plugin.
21+
*
22+
* @copyright 2021 David Mudrák <david@moodle.com>
23+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24+
*/
25+
class provider implements \core_privacy\local\metadata\null_provider {
26+
27+
use \core_privacy\local\legacy_polyfill;
28+
29+
/**
30+
* Returns stringid of a text explaining that this plugin stores no personal data.
31+
*
32+
* @return string
33+
*/
34+
public static function _get_reason() {
35+
return 'privacy:metadata';
36+
}
37+
}

lang/en/block_course_contents.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@
6464
$string['config_display_course_link_text'] = 'Custom course page link text';
6565
$string['config_display_course_link_text_desc'] = 'Default value of the course home page link anchor text. If left empty, the course shortname will be used.';
6666
$string['config_display_course_link_text_help'] = 'Course home page link anchor text. If left empty, the site-level default value will be used, unless it is also empty. In that case, the course shortname will be used.';
67+
68+
$string['privacy:metadata'] = 'Course contents does not store any personal data';

0 commit comments

Comments
 (0)