Git commits in Moodle 3.1.x by godric

commit 1790647ff928776379684d40dcab549f3238fe75
Author: godric <mr.pt.anh.bsb@gmail.com>
Date:   Tue, 29 Nov 2016 15:49:21 +0800
Tag:    v3.1.5

MDL-40132 lib: Using compare rule results in fatal error.