Git commits in Moodle 3.1.5 by Tim Hunt

commit 20c506c9709cea4afdf760f480ebfa9d5343de49
Author: Tim Hunt <T.J.Hunt@open.ac.uk>
Date:   Wed, 01 Mar 2017 20:43:50 +0800
Tag:    v3.1.5

MDL-58106 random Q restore: avoid MySQL performance issues

commit ed961702c66ff92ba94d33addbabab83adb9e8dd
Author: Tim Hunt <T.J.Hunt@open.ac.uk>
Date:   Tue, 21 Feb 2017 19:50:47 +0800
Tag:    v3.1.5

MDL-58035 lib: log when the expected theme cannot be initialised

commit 9e50e8c38661f77eb16e4e3f6b6f1f5f46fd7fdf
Author: Tim Hunt <T.J.Hunt@open.ac.uk>
Date:   Mon, 30 Jan 2017 22:31:15 +0800
Tag:    v3.1.5

MDL-57588 questions: regrading should not lose flags

commit 072a9719085a151c07e78aea5bbed4ce761e6490
Author: Tim Hunt <T.J.Hunt@open.ac.uk>
Date:   Fri, 27 Jan 2017 02:53:16 +0800
Tag:    v3.1.5

MDL-57587 question file access: fix regression caused by MDL-53744