Thanks to Andrew Nicols with help from Adrian Greeve, Jake Dallimore, Sander Bangma and Jun Pataleta.
This extensive documentation was drafted first in Google Docs (GDPR plugin API), thus the above authors are not credited in the page history.
Could the get_contexts_for_userid function be explained in a bit more detail. It's unclear why this data is being collected. My particular case in a custom enrolment plugin that contains user data. Is the context the course context, the user context or something else... and why? There are no actual example to go on. --Howard Miller (talk) 14:09, 8 May 2018 (UTC)
Pretty sure menu structure is all broken on this page. See menu levels 4.2 and 4.3. Sounds like they are not on the same level at all. It's currently rather confusing --Howard Miller (talk) 14:49, 8 May 2018 (UTC)
==Basic example of get_users_in_context
I believe the basic example of get_users_in_context (https://docs.moodle.org/dev/Privacy_API#Retrieving_the_users_in_a_context) is using the incorrect function. I'll make the change; change it back if I'm wrong.