Permalink
Browse files

MDL-33770 webservices: Fixed error with core_group_create_groups when…

… no enrolment key provided
  • Loading branch information...
1 parent adb1b0a commit 48d0a91018fdc5d6f6d5c3ececc7acc65579ca11 Sam Hemelryk committed Jul 4, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 group/externallib.php
View
@@ -89,6 +89,9 @@ public static function create_groups($groups) {
// finally create the group
$group->id = groups_create_group($group, false);
+ if (!isset($group->enrolmentkey)) {
+ $group->enrolmentkey = '';
+ }
$groups[] = (array)$group;
}

0 comments on commit 48d0a91

Please sign in to comment.