-
Bug
-
Resolution: Not a bug
-
Major
-
None
-
3.11.3
-
MOODLE_311_STABLE
How to reproduce:
- As admin, add a new site policy to a site (Site Administration ► Users ► Privacy and policies ► Manage policies ► New policy).
- When creating it, mark "Agreement optional" = YES. If I later change this to NO it also happens, but I'm not sure if the bug happens if the policy is created from scratch with this value set to NO.
- Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
- Create a new user in the site (Site Administration ► Users ► Add a new user).
- Create a Token in the mobile app service for the user you just created.
- Click on Site administration ► Plugins ► Web services ► Manage tokens
- Open the console an execute this new curl request, replacing wstoken with the token you just created and the site url with yours.
curl 'http://YOUR_SITE/webservice/rest/server.php?moodlewsrestformat=json' --data 'moodlewssettingfilter=true&moodlewssettingfileurl=true&wsfunction=core_user_agree_site_policy&wstoken=WS_TOKEN'
- Check that it returns status: true.
- As admin, go to Site Administration ► Users ► Privacy and policies ► User agreements.
- Search the user, check that it's still marked as Pending.