MDL-62309 tool_policy: Amend behaviour of handler's accept() method
commit222c378870249909948b9d030a3cdffe940b6738
authorDavid Mudrák <david@moodle.com>
Fri, 5 Oct 2018 15:09:29 +0000 (5 17:09 +0200)
committerDavid Mudrák <david@moodle.com>
Mon, 22 Oct 2018 06:49:36 +0000 (22 08:49 +0200)
tree24f3926a94225704bc0d65fed70b34491853bbb4
parentad5e2135c5d2ccd7f53a08fc0c66de66d431cfdf
MDL-62309 tool_policy: Amend behaviour of handler's accept() method

When accepting the policies via the sitepolicy handler, only compulsory
policies are to be marked as accepted. Optional policies will be left as
pending. Users must express their consent explicitly for them.

As a side product of the change, unit tests are added for the whole
handler class.
admin/tool/policy/classes/privacy/local/sitepolicy/handler.php
admin/tool/policy/classes/test/helper.php [new file with mode: 0644]
admin/tool/policy/tests/api_test.php
admin/tool/policy/tests/sitepolicy_handler_test.php [new file with mode: 0644]