-
Functional Test
-
Minor
-
Moodle 2.9
-
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
Test
- Login as teacher
- Navigate to Activity examples course
- Edit "Online Text Assignment" activity
- Set "Allow submissions from" to more then a year from now.
- Uncheck "Always show description"
- Attach few file in description.
- Edit "Assignment with file submissions"
- Set "Allow submissions from" to some date in past
- Uncheck "Always show description"
- Attach few file in description
- Edit "Assignment with file submissions"
- Set "Allow submissions from" to some date in past
- Check "Always show description"
- Attach few file in description
- Run following command on your console
curl 'http://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 'Cookie: MoodleSession=hs46mckao127eh1655cdq4fqn0' -H 'Connection: keep-alive' --data 'courseids%5B0%5D=3&wsfunction=mod_assign_get_assignments&wstoken=d49d1fac7125d9fd515c374be8d37c34' --compressed | python -m json.tool
- Confirm you receive a list of courses with four assignments.
- One of the assignments should not display intro, introattachments and introformat (the one you configured to not display always the description and start date 1 year in future)
- The other assignments displays description (intro) and a list of attached files (introattachments)