Skip to content

Commit 1b764a2

Browse files
David Monllaojunpataleta
authored andcommitted
Merge branch 'MDL-62249-master' of git://github.com/zig-moodle/moodle
2 parents 99a080f + e151fda commit 1b764a2

File tree

2 files changed

+57
-8
lines changed

2 files changed

+57
-8
lines changed

blocks/tag_flickr/classes/privacy/provider.php

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,71 @@
2424

2525
namespace block_tag_flickr\privacy;
2626

27+
use core_privacy\local\metadata\collection;
28+
use core_privacy\local\request\approved_contextlist;
29+
use core_privacy\local\request\context;
30+
use core_privacy\local\request\contextlist;
31+
2732
defined('MOODLE_INTERNAL') || die();
2833

2934
/**
30-
* Privacy Subsystem for block_tag_flickr implementing null_provider.
35+
* Privacy Subsystem for block_tag_flickr implementing metadata and plugin provider.
3136
*
3237
* @copyright 2018 Zig Tan <zig@moodle.com>
3338
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3439
*/
35-
class provider implements \core_privacy\local\metadata\null_provider {
40+
class provider implements \core_privacy\local\metadata\provider, \core_privacy\local\request\plugin\provider {
41+
42+
/**
43+
* Returns meta data about this system.
44+
*
45+
* @param collection $collection The initialised collection to add items to.
46+
* @return collection A listing of user data stored through this system.
47+
*/
48+
public static function get_metadata(collection $collection) : collection {
49+
$collection->add_external_location_link(
50+
'flickr.com',
51+
[
52+
'tags' => 'privacy:metadata:block_tag_flickr:tags'
53+
],
54+
'privacy:metadata:block_tag_flickr'
55+
);
56+
57+
return $collection;
58+
}
59+
60+
/**
61+
* Get the list of contexts that contain user information for the specified user.
62+
*
63+
* @param int $userid The user to search.
64+
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
65+
*/
66+
public static function get_contexts_for_userid(int $userid) : contextlist {
67+
return new contextlist();
68+
}
3669

3770
/**
38-
* Get the language string identifier with the component's language
39-
* file to explain why this plugin stores no data.
71+
* Export all user data for the specified user, in the specified contexts.
4072
*
41-
* @return string
73+
* @param approved_contextlist $contextlist The approved contexts to export information for.
4274
*/
43-
public static function get_reason() : string {
44-
return 'privacy:metadata';
75+
public static function export_user_data(approved_contextlist $contextlist) {
4576
}
77+
78+
/**
79+
* Delete all data for all users in the specified context.
80+
*
81+
* @param context $context The specific context to delete data for.
82+
*/
83+
public static function delete_data_for_all_users_in_context(\context $context) {
84+
}
85+
86+
/**
87+
* Delete all user data for the specified user, in the specified contexts.
88+
*
89+
* @param approved_contextlist $contextlist The approved contexts and user information to delete information for.
90+
*/
91+
public static function delete_data_for_user(approved_contextlist $contextlist) {
92+
}
93+
4694
}

blocks/tag_flickr/lang/en/block_tag_flickr.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@
3737
$string['relevance'] = 'Relevance';
3838
$string['sortby'] = 'Sort by';
3939
$string['tag_flickr:addinstance'] = 'Add a new flickr block';
40-
$string['privacy:metadata'] = 'The Flickr block only shows data stored in other locations.';
40+
$string['privacy:metadata:block_tag_flickr'] = 'The Flickr block plugin does not store any personal data, but does transmit user data from Moodle to the remote system.';
41+
$string['privacy:metadata:block_tag_flickr:tags'] = 'The tag values sent as CSV format to search for Flickr images.';

0 commit comments

Comments
 (0)