Git commits in Moodle 3.3.5 by Nick Phillips

commit 7d5efd643cc3bada2c52fc8fec6e64af47d865e8
Author: Nick Phillips <nick.phillips@otago.ac.nz>
Date:   Tue, 17 Oct 2017 06:46:11 +0800
Tag:    v3.3.5

MDL-56688 grade: fix ordering of grade items in grade_seq::flatten