mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
Merge branch 'MDL-63924-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
1d2adca39b
@ -87,11 +87,17 @@ class metadata_registry {
|
||||
$internaldata['deprecated'] = true;
|
||||
}
|
||||
|
||||
// Check that the userlist provider is implemented.
|
||||
// Check that the core_userlist_provider is implemented for all user data providers.
|
||||
if ($componentclass instanceof \core_privacy\local\request\core_user_data_provider
|
||||
&& !$componentclass instanceof \core_privacy\local\request\core_userlist_provider) {
|
||||
$internaldata['userlistnoncompliance'] = true;
|
||||
}
|
||||
|
||||
// Check that any type of userlist_provider is implemented for all shared data providers.
|
||||
if ($componentclass instanceof \core_privacy\local\request\shared_data_provider
|
||||
&& !$componentclass instanceof \core_privacy\local\request\userlist_provider) {
|
||||
$internaldata['userlistnoncompliance'] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,10 @@ defined('MOODLE_INTERNAL') || die();
|
||||
* @author Adrian Greeve <adriangreeve.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
interface logstore_userlist_provider extends \core_privacy\local\request\plugin\subplugin_provider {
|
||||
interface logstore_userlist_provider extends
|
||||
\core_privacy\local\request\plugin\subplugin_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Add user IDs that contain user information for the specified context.
|
||||
|
4
cache/classes/privacy/provider.php
vendored
4
cache/classes/privacy/provider.php
vendored
@ -39,7 +39,9 @@ class provider implements
|
||||
\core_privacy\local\metadata\provider,
|
||||
|
||||
// The cache subsystem stores data on behalf of other components.
|
||||
\core_privacy\local\request\subsystem\plugin_provider {
|
||||
\core_privacy\local\request\subsystem\plugin_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns meta data about this system.
|
||||
|
@ -37,7 +37,11 @@ use \core_privacy\local\request\userlist;
|
||||
* @copyright 2018 Adrian Greeve <adrian@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class provider implements \core_privacy\local\metadata\provider, \core_privacy\local\request\subsystem\plugin_provider {
|
||||
class provider implements
|
||||
\core_privacy\local\metadata\provider,
|
||||
\core_privacy\local\request\subsystem\plugin_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns meta data about this system.
|
||||
|
@ -41,7 +41,11 @@ require_once($CFG->dirroot . '/comment/lib.php');
|
||||
* @copyright 2018 Adrian Greeve <adrian@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class provider implements \core_privacy\local\metadata\provider, \core_privacy\local\request\subsystem\plugin_provider {
|
||||
class provider implements
|
||||
\core_privacy\local\metadata\provider,
|
||||
\core_privacy\local\request\subsystem\plugin_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns meta data about this system.
|
||||
|
@ -48,7 +48,8 @@ class provider implements
|
||||
\core_privacy\local\request\subsystem\plugin_provider,
|
||||
\core_privacy\local\request\core_userlist_provider,
|
||||
// We store a userkey for token-based file access.
|
||||
\core_privacy\local\request\subsystem\provider {
|
||||
\core_privacy\local\request\subsystem\provider,
|
||||
\core_privacy\local\request\shared_userlist_provider {
|
||||
|
||||
/**
|
||||
* Returns metadata.
|
||||
|
@ -26,7 +26,9 @@ namespace core_grading\privacy;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
interface gradingform_provider_v2 extends
|
||||
\core_privacy\local\request\plugin\subsystem_provider {
|
||||
\core_privacy\local\request\plugin\subsystem_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Export user data relating to an instance ID.
|
||||
|
@ -51,7 +51,9 @@ class provider implements
|
||||
\core_privacy\local\request\subsystem\plugin_provider,
|
||||
|
||||
// This plugin is capable of determining which users have data within it.
|
||||
\core_privacy\local\request\core_userlist_provider {
|
||||
\core_privacy\local\request\core_userlist_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns meta data about this system.
|
||||
|
@ -39,9 +39,11 @@ use core_privacy\local\request\userlist;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class provider implements
|
||||
\core_privacy\local\metadata\provider,
|
||||
\core_privacy\local\metadata\provider,
|
||||
|
||||
\core_privacy\local\request\subsystem\plugin_provider {
|
||||
\core_privacy\local\request\subsystem\plugin_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns meta data about this system.
|
||||
|
@ -28,7 +28,10 @@ namespace mod_assign\privacy;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
interface assignfeedback_user_provider extends \core_privacy\local\request\plugin\subplugin_provider {
|
||||
interface assignfeedback_user_provider extends
|
||||
\core_privacy\local\request\plugin\subplugin_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* If you have tables that contain userids and you can generate entries in your tables without creating an
|
||||
@ -49,4 +52,4 @@ interface assignfeedback_user_provider extends \core_privacy\local\request\plugi
|
||||
*/
|
||||
public static function delete_feedback_for_grades(assign_plugin_request_data $deletedata);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,10 @@ use core_privacy\local\request\userlist;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
interface assignsubmission_user_provider extends \core_privacy\local\request\plugin\subplugin_provider {
|
||||
interface assignsubmission_user_provider extends
|
||||
\core_privacy\local\request\plugin\subplugin_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* If you have tables that contain userids and you can generate entries in your tables without creating an
|
||||
@ -51,4 +54,4 @@ interface assignsubmission_user_provider extends \core_privacy\local\request\plu
|
||||
*/
|
||||
public static function delete_submissions(assign_plugin_request_data $deletedata);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,13 @@ defined('MOODLE_INTERNAL') || die();
|
||||
* @copyright 2018 Marina Glancy
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
interface datafield_provider extends \core_privacy\local\request\plugin\subplugin_provider {
|
||||
interface datafield_provider extends
|
||||
\core_privacy\local\request\plugin\subplugin_provider,
|
||||
|
||||
// The data subplugins do not need to do anything themselves for the shared_userlist.
|
||||
// This is all handled by the parent plugin.
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Exports data about one record in {data_content} table.
|
||||
|
@ -33,7 +33,10 @@ defined('MOODLE_INTERNAL') || die();
|
||||
* @copyright 2018 David Mudrák <david@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
interface workshopform_provider extends \core_privacy\local\request\plugin\subplugin_provider {
|
||||
interface workshopform_provider extends
|
||||
\core_privacy\local\request\plugin\subplugin_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Return details of the filled assessment form.
|
||||
|
@ -34,7 +34,8 @@ defined('MOODLE_INTERNAL') || die();
|
||||
*/
|
||||
interface plagiarism_user_provider extends
|
||||
// The plagiarism_provider should be implemented by plugins which only provide information to a subsystem.
|
||||
\core_privacy\local\request\plugin\subsystem_provider {
|
||||
\core_privacy\local\request\plugin\subsystem_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider {
|
||||
|
||||
/**
|
||||
* Delete all user information for the provided users and context.
|
||||
|
@ -40,7 +40,9 @@ class provider implements
|
||||
\core_privacy\local\metadata\provider,
|
||||
|
||||
// The Plagiarism subsystem will be called by other components and will forward requests to each plagiarism plugin implementing its APIs.
|
||||
\core_privacy\local\request\subsystem\plugin_provider {
|
||||
\core_privacy\local\request\subsystem\plugin_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns meta data about this system.
|
||||
|
@ -34,7 +34,10 @@ defined('MOODLE_INTERNAL') || die();
|
||||
*/
|
||||
interface portfolio_provider extends
|
||||
// The portfolio_provider should be implemented by plugins which only provide information to a subsystem.
|
||||
\core_privacy\local\request\plugin\subsystem_provider {
|
||||
\core_privacy\local\request\plugin\subsystem_provider,
|
||||
|
||||
// The implementation for prtfolios is handled in the subsystem itself.
|
||||
\core_privacy\local\request\shared_userlist_provider {
|
||||
|
||||
/**
|
||||
* Export all portfolio data from each portfolio plugin for the specified userid and context.
|
||||
|
@ -45,7 +45,9 @@ class provider implements
|
||||
\core_privacy\local\request\plugin\provider,
|
||||
\core_privacy\local\request\core_userlist_provider,
|
||||
// The portfolio subsystem will be called by other components.
|
||||
\core_privacy\local\request\subsystem\plugin_provider {
|
||||
\core_privacy\local\request\subsystem\plugin_provider,
|
||||
|
||||
\core_privacy\local\request\shared_userlist_provider {
|
||||
|
||||
/**
|
||||
* Returns meta data about this system.
|
||||
|
@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||
* @package core_privacy
|
||||
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
|
||||
*/
|
||||
interface core_userlist_provider {
|
||||
interface core_userlist_provider extends userlist_provider {
|
||||
|
||||
/**
|
||||
* Get the list of users who have data within a context.
|
||||
|
37
privacy/classes/local/request/shared_userlist_provider.php
Normal file
37
privacy/classes/local/request/shared_userlist_provider.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* This file contains an interface to describe classes which provide user data in some form for shared providers.
|
||||
*
|
||||
* @package core_privacy
|
||||
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
namespace core_privacy\local\request;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* The interface is used to describe a provider which is capable of identifying the users who have data within it.
|
||||
*
|
||||
* It describes data how these requests are serviced in a specific format.
|
||||
*
|
||||
* @package core_privacy
|
||||
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
|
||||
*/
|
||||
interface shared_userlist_provider extends userlist_provider {
|
||||
}
|
37
privacy/classes/local/request/userlist_provider.php
Normal file
37
privacy/classes/local/request/userlist_provider.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* This file contains an interface to describe classes which userlist support.
|
||||
*
|
||||
* @package core_privacy
|
||||
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
namespace core_privacy\local\request;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* The interface is used to describe a provider which is capable of identifying the users who have data within it.
|
||||
*
|
||||
* It describes data how these requests are serviced in a specific format.
|
||||
*
|
||||
* @package core_privacy
|
||||
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
|
||||
*/
|
||||
interface userlist_provider {
|
||||
}
|
@ -61,7 +61,10 @@ class provider implements
|
||||
\core_privacy\local\request\subsystem\plugin_provider,
|
||||
|
||||
// This plugin is capable of determining which users have data within it.
|
||||
\core_privacy\local\request\core_userlist_provider
|
||||
\core_privacy\local\request\core_userlist_provider,
|
||||
|
||||
// This plugin is capable of determining which users have data within it for the plugins it provides data to.
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
|
@ -46,7 +46,9 @@ class provider implements
|
||||
// as a result.
|
||||
|
||||
// The ratings subsystem provides a data service to other components.
|
||||
\core_privacy\local\request\subsystem\plugin_provider {
|
||||
\core_privacy\local\request\subsystem\plugin_provider,
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns metadata about the ratings subsystem.
|
||||
|
@ -51,7 +51,10 @@ class provider implements
|
||||
\core_privacy\local\request\core_userlist_provider,
|
||||
|
||||
// The tag subsystem may have data that belongs to this user.
|
||||
\core_privacy\local\request\plugin\provider {
|
||||
\core_privacy\local\request\plugin\provider,
|
||||
|
||||
\core_privacy\local\request\shared_userlist_provider
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns meta data about this system.
|
||||
|
Loading…
x
Reference in New Issue
Block a user