Show
This issue should be tested in 1 Android device and 1 iOS device. Also, it should be tested in 1 tablet device and 1 phone device.
Test Default handler
In a 4.4 moodle site as admin, go to Site administration > Users > Policy settings.
Set "Site policy handler" to "Default (core)" and add a "Site policy URL".
In the app, login with a user that hasn't accepted the policy. Check that the app displays a page with a link to the policy and a checkbox and button to accept it. Depending on the URL, the app will also display an iframe to show the policies. (this hasn't changed so there's no need to test the iframe part).
Accept the policy. Check that after accepting the policy you can use the app normally.
Open the user menu. Check that you do NOT see a "Policies and agreements" section.
Test tool_policy handler
In a 4.4 moodle site as admin, go to Site administration > Users > Policy settings.
Set "Site policy handler" to "tool_policy".
Go to Site administration > Users > Manage policies and create several policies. You should create at least 1 mandatory policy and 1 optional policy. Also, you need at least 1 policy with "Show policy before showing other policies" set to Yes, and at least 2 policies with "Show policy before showing other policies" set to No.
In the app, login with a user that hasn't accepted the policies. Check that the app displays the first policy to accept (it should be one of the policies with "Show policy before showing other policies" set to Yes). Check that you can read and accept the policy (if it's optional, you should be able to decline it too).
After accepting/declining the policy, check that the next policy is displayed. The app should keep displaying policies until you have accepted them all. You can compare this with how LMS works.
After accepting all the policies, check that you can use the app normally.
Back in browser as admin, add a new site policy (no matter which type), or edit one of the existing ones to add a new version.
In the app, perform a PTR in My courses / Dashboard. Check that the app forces you to accept the new policy. The app should only display the new policy, not the others. If you're comparing this with LMS, please notice that in LMS you need to logout and login again with the student to see the new policy acceptance form, you can continue using the site until you logout. In the app this isn't possible.
Once you have accepted all policies, open the user menu and go to "Policies and agreements".
If data privacy is configured, check that the app displays a button to contact the DPO. Check that clicking the button opens the Data privacy page.
Check that the app displays a list of the policies along with the status, similar to what LMS does.
Check that you can accept/decline optional policies, but not mandatory policies that have already been accepted.
If a policy has several versions, check that you can see the previous versions of the policy too.
Test old sites
This part only needs to be tested in 1 device.
In a 4.3 or older site, configure it to use tool_policy and create at least 1 policy.
In the app, login with a user that hasn't accepted the policies. Check that the app displays a page with a link to the policies and a checkbox and button to accept them. This is how the app used to work until now, it hasn't changed for older sites.
After accepting the policies, open the user menu. Check that you do NOT see a "Policies and agreements" section.