Merge branch 'MDL-65965-35-fix' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE
This commit is contained in:
@@ -707,6 +707,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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user