Git commits in Moodle 3.9.x by Marty Gilbert

commit 88f81cf8d1dbd21a1523be8359409363c27ec9d3
Author: Marty Gilbert <martygilbert@gmail.com>
Date:   Sat, 20 Jun 2020 02:57:31 +0800
Tag:    v3.9.7

MDL-69102 badge: Fixes broken WHERE clause