New privacy API functions incompatible with previous Moodle versions

Re: New privacy API functions incompatible with previous Moodle versions

by Andrew Lyons -
Number of replies: 0
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Jan,

Re your third solution, that's very similar to what we have proposed in the API documentation with one key difference - just implement an interface if it doesn't exist:

namespace assignsubmission_example\privacy;
 
if (interface_exists('\core_privacy\local\request\userlist')) {
    interface my_userlist extends \core_privacy\local\request\userlist{}
} else {
    interface my_userlist {};
} 

class provider implements my_userlist {

Andrew

Average of ratings: Useful (2)