Skip to content

Commit

Permalink
MDL-67913 core: Add new core_table component path
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols authored and lameze committed Mar 16, 2020
1 parent 73f8c56 commit 1142e1b
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lang/en/table.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
*/

$string['downloadas'] = 'Download table data as';

$string['privacy:metadata'] = 'The Table API does not currently store any user data';
2 changes: 1 addition & 1 deletion lib/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"rss": "rss",
"role": "admin\/roles",
"search": "search",
"table": null,
"table": "lib\/table",
"tag": "tag",
"timezones": null,
"user": "user",
Expand Down
50 changes: 50 additions & 0 deletions lib/table/classes/privacy/provider.php
Original file line number Diff line number Diff line change
@@ -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 Subsystem for core_table API.
*
* @package core_table
* @copyright 2020 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

declare(strict_types=1);

namespace core_table\privacy;

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

use core_privacy\local\metadata\null_provider;

/**
* Privacy Subsystem for core_table API.
*
* @copyright 2020 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements 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(): string {
return 'privacy:metadata';
}
}
3 changes: 3 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@
<testsuite name="core_rss_testsuite">
<directory suffix="_test.php">rss/tests</directory>
</testsuite>
<testsuite name="core_table_testsuite">
<directory suffix="_test.php">lib/table/tests</directory>
</testsuite>
<testsuite name="core_h5p_testsuite">
<directory suffix="_test.php">h5p/tests</directory>
</testsuite>
Expand Down

0 comments on commit 1142e1b

Please sign in to comment.