Git commits in Moodle 3.4.2 by Nick Phillips

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

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