Moodle release 2.7
MDL-45323 grade: Fix query errors on grade_get_grade_for_activity method.