forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-63044 block_myoverview: remove tab preference
- Loading branch information
1 parent
2c13ae0
commit bbe6ead
Showing
12 changed files
with
28 additions
and
235 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,30 +32,15 @@ | |
* @copyright 2018 Zig Tan <[email protected]> | ||
* @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\user_preference_provider { | ||
class provider implements \core_privacy\local\metadata\null_provider { | ||
|
||
/** | ||
* Returns meta-data information about the myoverview block. | ||
* Get the language string identifier with the component's language | ||
* file to explain why this plugin stores no data. | ||
* | ||
* @param \core_privacy\local\metadata\collection $collection A collection of meta-data. | ||
* @return \core_privacy\local\metadata\collection Return the collection of meta-data. | ||
* @return string | ||
*/ | ||
public static function get_metadata(\core_privacy\local\metadata\collection $collection) : | ||
\core_privacy\local\metadata\collection { | ||
$collection->add_user_preference('block_myoverview_last_tab', 'privacy:metadata:overviewlasttab'); | ||
return $collection; | ||
} | ||
|
||
/** | ||
* Export all user preferences for the myoverview block | ||
* | ||
* @param int $userid The userid of the user whose data is to be exported. | ||
*/ | ||
public static function export_user_preferences(int $userid) { | ||
$preference = get_user_preferences('block_myoverview_last_tab', null, $userid); | ||
if (isset($preference)) { | ||
\core_privacy\local\request\writer::export_user_preference('block_myoverview', 'block_myoverview_last_tab', | ||
$preference, get_string('privacy:metadata:overviewlasttab', 'block_myoverview')); | ||
} | ||
public static function get_reason() : string { | ||
return 'privacy:metadata'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters