Merge branch 'MDL-65965-36-fix' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE

This commit is contained in:
Andrew Nicols
2019-07-09 11:00:47 +08:00
@@ -727,6 +727,11 @@ class behat_data_generators extends behat_base {
protected function get_grouping_id($idnumber) {
global $DB;
// Do not fetch grouping ID for empty grouping idnumber.
if (empty($idnumber)) {
return null;
}
if (!$id = $DB->get_field('groupings', 'id', array('idnumber' => $idnumber))) {
throw new Exception('The specified grouping with idnumber "' . $idnumber . '" does not exist');
}