Permalink
Browse files

Merge branch 'w49_MDL-36731_m23_uploadestrict' of git://github.com/sk…

…odak/moodle into MOODLE_23_STABLE
  • Loading branch information...
2 parents 237ea87 + ee152c0 commit b54470f497323a553b3af4fcfcc124f204d84d90 Sam Hemelryk committed Dec 11, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 admin/tool/uploaduser/index.php
@@ -900,7 +900,11 @@
$newgroupdata = new stdClass();
$newgroupdata->name = $addgroup;
$newgroupdata->courseid = $ccache[$shortname]->id;
- if ($ccache[$shortname]->groups[$addgroup]->id = groups_create_group($newgroupdata)){
+ $newgroupdata->description = '';
+ $gid = groups_create_group($newgroupdata);
+ if ($gid){
+ $ccache[$shortname]->groups[$addgroup] = new stdClass();
+ $ccache[$shortname]->groups[$addgroup]->id = $gid;
$ccache[$shortname]->groups[$addgroup]->name = $newgroupdata->name;
} else {
$upt->track('enrolments', get_string('unknowngroup', 'error', s($addgroup)), 'error');

0 comments on commit b54470f

Please sign in to comment.