MDL-63919 tool_dataprivacy: admin & notify fixes
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Sat, 10 Nov 2018 01:22:12 +0000 (02:22 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Sat, 10 Nov 2018 01:22:12 +0000 (02:22 +0100)
commitbaf3fd4177dd5cb3263dbe46c51c5fc5c8aee81d
tree9f93e3557f47d743245d9f84a2deb2ae6347bb26
parent5c0f8dcddf67a3d12d1aa600b1cc8bab9a33cf20
MDL-63919 tool_dataprivacy: admin & notify fixes

This includes the following:

1) Replace $ADMIN->id by get_admin()->id. The former doesn't exist.
2) Only change the notify parameter when it has not been specified
   at creation time (null). If specified, observe it.
3) Set the current user in tests to admin, able to create those
   requests.
admin/tool/dataprivacy/classes/api.php
admin/tool/dataprivacy/tests/user_deleted_observer_test.php