Privacy API -which context to use

Privacy API -which context to use

by Amanda Doughty -
Number of replies: 3
Picture of Core developers Picture of Plugin developers

We have a plugin for course rollover. It stores details including:

1. The user who rolled over a course.

2. The source (backup) course.

3. The destination (restore) course.

I am confused about which context to use for the Privacy API. Is is user or course (x2) or system? I'd really appreciate some guidance on how to choose. I saw this post where a user is having a similar dilemma: https://moodle.org/mod/forum/discuss.php?d=381492

Average of ratings: -
In reply to Amanda Doughty

Re: Privacy API -which context to use

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I would treat this at the system context, based on the logic that the admin staff doing the rollover are doing a system admin task.
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Re: Privacy API -which context to use

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
I agree. It's either a System context action, or a Course context action. Either would be fine, but it depends where you feel that this "belongs".
Average of ratings: Useful (1)