-
Functional Test
-
Minor
-
Moodle 3.2
-
None
For testing this issue:
- You need to have access to console on your system
- Curl and python should be installed on your system.
- Have basic understanding of Json
Prerequisite
- Login as admin
- Enable web services (Site administration ▶︎ Advanced features)
- Enable Rest protocol (Site administration ▶︎ Plugins ▶︎ Web services ▶︎ Manage protocols)
- Enable mobile web service (Site administration ▶︎ Plugins ▶︎ Web services ▶︎ Mobile)
- Create a token for teacher (Site administration ▶︎ Plugins ▶︎ Web services ▶︎ Manage tokens)
- Save token and use it to replace d49d1fac7125d9fd515c374be8d37c34 in the web service below.
Test
- As teacher edit "Activity examples" course
- Set Format to "Weekly format"
- Set "Force language" to "Deutsch (de)"
- Set "Show gradebook to students" to "Yes"
- Set "Enable completion tracking" to "Yes"
- Edit "Glorious gradebook" course
- Set Format to "Topic format"
- Set "Force language" to "Do not force"
- Set "Show gradebook to students" to "No"
- Set "Enable completion tracking" to "No"
- Run following command on your console
curl 'https://qa.moodle.net/webservice/rest/server.php?moodlewsrestformat=json' -H 'Pragma: no-cache' -H 'Origin: file://' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: es,en;q=0.8,de-DE;q=0.6,de;q=0.4,nb;q=0.2' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1798.0 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, /; q=0.01' -H 'Cache-Control: no-cache' -H 'Connection: keep-alive' --data 'userid=4&wsfunction=core_enrol_get_users_courses&wstoken=d49d1fac7125d9fd515c374be8d37c34' --compressed | python -m json.tool
- Confirm you get information about 3 courses
- Verify all the new fields appears as expected: (summary, summaryformat, format, showgrades, lang, enablecompletion)