Skip to content

Commit

Permalink
MDL-29102 fix notice when auto-creating groups in existing grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jan 15, 2012
1 parent 60e9909 commit ca50186
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions group/autogroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,10 @@

// prepare grouping
if (!empty($data->grouping)) {
$groupingname = trim($data->groupingname);
if ($data->grouping < 0) {
$grouping = new stdClass();
$grouping->courseid = $COURSE->id;
$grouping->name = $groupingname;
$grouping->name = trim($data->groupingname);
$grouping->id = groups_create_grouping($grouping);
$createdgrouping = $grouping->id;
} else {
Expand Down

0 comments on commit ca50186

Please sign in to comment.