-
Functional Test
-
Minor
-
Moodle 3.3
This test requires Mobile services to be enabled.
- Log in as an admin and go to 'Mobile features' in the Site administration.
- Add some custom lang strings e.g
mm.user.student|Learner|en
mm.user.student|Aprendiz|es
mm.user.student|Aprendiz|es_mx - Create a web services token for one standard user:
- Click on Site administration > Plugins > Web services > Manage tokens
- Next, you can do 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 you correctly receive the new custom lang strings.
- Go to the mobile settings again, and remove all the custom lang strings.
- Execute the curl request again and check that you now get an empty value for the custom lang strings.