mirror of
https://github.com/moodle/moodle.git
synced 2025-03-21 08:00:37 +01:00
Merge branch 'MDL-65965-master-fix' of git://github.com/junpataleta/moodle
This commit is contained in:
commit
c30d15814a
@ -806,6 +806,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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user