Skip to content

Commit

Permalink
MDL-61397 blocks: Add null_providers for blocks with no user data
Browse files Browse the repository at this point in the history
  • Loading branch information
zig-moodle authored and andrewnicols committed Mar 12, 2018
1 parent 703fca7 commit bcc3f1e
Show file tree
Hide file tree
Showing 72 changed files with 1,692 additions and 2 deletions.
46 changes: 46 additions & 0 deletions blocks/activity_modules/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 implementation for block_activity_modules.
*
* @package block_activity_modules
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_activity_modules\privacy;

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

/**
* Privacy Subsystem for block_activity_modules implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\metadata\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';
}
}
1 change: 1 addition & 0 deletions blocks/activity_modules/lang/en/block_activity_modules.php
Expand Up @@ -24,3 +24,4 @@

$string['activity_modules:addinstance'] = 'Add a new activities block';
$string['pluginname'] = 'Activities';
$string['privacy:metadata'] = 'The Activites block only shows data stored in other locations.';
46 changes: 46 additions & 0 deletions blocks/activity_results/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 implementation for block_activity_results.
*
* @package block_activity_results
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_activity_results\privacy;

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

/**
* Privacy Subsystem for block_activity_results implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\metadata\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';
}
}
1 change: 1 addition & 0 deletions blocks/activity_results/lang/en/block_activity_results.php
Expand Up @@ -65,3 +65,4 @@
$string['worstgrades'] = 'The {$a} lowest grades:';
$string['worstgroupgrade'] = 'The group with the lowest average:';
$string['worstgroupgrades'] = 'The {$a} groups with the lowest average:';
$string['privacy:metadata'] = 'The Activites results block only shows data stored in other locations.';
46 changes: 46 additions & 0 deletions blocks/admin_bookmarks/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 implementation for block_admin_bookmarks.
*
* @package block_admin_bookmarks
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_admin_bookmarks\privacy;

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

/**
* Privacy Subsystem for block_admin_bookmarks implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\metadata\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';
}
}
1 change: 1 addition & 0 deletions blocks/admin_bookmarks/lang/en/block_admin_bookmarks.php
Expand Up @@ -25,3 +25,4 @@
$string['admin_bookmarks:addinstance'] = 'Add a new admin bookmarks block';
$string['admin_bookmarks:myaddinstance'] = 'Add a new admin bookmarks block to Dashboard';
$string['pluginname'] = 'Admin bookmarks';
$string['privacy:metadata'] = 'The Admin bookmarks block only shows data stored in other locations.';
46 changes: 46 additions & 0 deletions blocks/badges/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 implementation for block_badges.
*
* @package block_badges
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_badges\privacy;

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

/**
* Privacy Subsystem for block_badges implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\metadata\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';
}
}
1 change: 1 addition & 0 deletions blocks/badges/lang/en/block_badges.php
Expand Up @@ -28,3 +28,4 @@
$string['nothingtodisplay'] = 'You have no badges to display';
$string['badges:addinstance'] = 'Add a new My latest badges block';
$string['badges:myaddinstance'] = 'Add a new My latest badges block to Dashboard';
$string['privacy:metadata'] = 'The Badges block only shows data stored in other locations.';
46 changes: 46 additions & 0 deletions blocks/blog_menu/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 implementation for block_blog_menu.
*
* @package block_blog_menu
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_blog_menu\privacy;

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

/**
* Privacy Subsystem for block_blog_menu implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\metadata\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';
}
}
1 change: 1 addition & 0 deletions blocks/blog_menu/lang/en/block_blog_menu.php
Expand Up @@ -25,3 +25,4 @@

$string['blog_menu:addinstance'] = 'Add a new blog menu block';
$string['pluginname'] = 'Blog menu';
$string['privacy:metadata'] = 'The Blog menu block only shows data stored in other locations.';
46 changes: 46 additions & 0 deletions blocks/blog_recent/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 implementation for block_blog_recent.
*
* @package block_blog_recent
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_blog_recent\privacy;

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

/**
* Privacy Subsystem for block_blog_recent implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\metadata\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';
}
}
1 change: 1 addition & 0 deletions blocks/blog_recent/lang/en/block_blog_recent.php
Expand Up @@ -28,3 +28,4 @@
$string['numentriestodisplay'] = 'Number of recent entries to display';
$string['pluginname'] = 'Recent blog entries';
$string['recentinterval'] = 'Interval of time considered "recent"';
$string['privacy:metadata'] = 'The Recent blog entries block only shows data stored in other locations.';
46 changes: 46 additions & 0 deletions blocks/blog_tags/classes/privacy/provider.php
@@ -0,0 +1,46 @@
<?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 implementation for block_blog_tags.
*
* @package block_blog_tags
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_blog_tags\privacy;

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

/**
* Privacy Subsystem for block_blog_tags implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\metadata\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';
}
}
1 change: 1 addition & 0 deletions blocks/blog_tags/lang/en/block_blog_tags.php
Expand Up @@ -25,3 +25,4 @@
$string['blog_tags:addinstance'] = 'Add a new blog tags block';
$string['pluginname'] = 'Blog tags';
$string['configtitle'] = 'Blog tags block title';
$string['privacy:metadata'] = 'The Blog tags block only shows data stored in other locations.';

0 comments on commit bcc3f1e

Please sign in to comment.