-
Functional Test
-
Minor
-
Moodle 3.3
This test requires mobile services to be enabled.
- Log in as an admin and go to 'Manage tokens' in the Site administration.
- Create a web services token for a standard user.
- Make a CURL REST call simulating a WS client with the user.
- You need to replace the wstoken, and the URL of your Moodle instance
curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=tool_mobile_get_config&wstoken=12a2a65aeea2a177055e233f9e303218§ion=mobileapp' | python -m "json.tool"
- You need to replace the wstoken, and the URL of your Moodle instance
- Check that by default the tool_mobile_forcelogout value is set to 0
- Go to 'Mobile features' in the Site administration and enable the setting 'Force log out' (tool_mobile | forcelogout).
- Execute the curl request again and check that the value is set to 1.
- Execute the curl request again removing the §ion=mobileapp part from the query
- Check that you receive a list of several settings and tool_mobile_forcelogout is correctly set to 1.