Skip to content

Commit

Permalink
Merge branch 'MDL-65965-master-fix' of git://github.com/junpataleta/m…
Browse files Browse the repository at this point in the history
…oodle
  • Loading branch information
andrewnicols committed Jul 9, 2019
2 parents dbeada6 + 5fb766d commit c30d158
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/tests/behat/behat_data_generators.php
Expand Up @@ -806,6 +806,11 @@ protected function get_group_id($idnumber) {
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');
}
Expand Down

0 comments on commit c30d158

Please sign in to comment.