mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
merged fix for MDL-8666, groups import broken
This commit is contained in:
parent
bcb2c37a8d
commit
b8c15d5f94
1 changed files with 2 additions and 4 deletions
|
@ -164,11 +164,9 @@
|
|||
$newgrpcoursecontext = get_context_instance(CONTEXT_COURSE, $newgroup->courseid);
|
||||
|
||||
///Users cannot upload groups in courses they cannot update.
|
||||
if (has_capability('moodle/course:update', $newgrpcoursecontext)){
|
||||
if (!has_capability('moodle/course:update', $newgrpcoursecontext)){
|
||||
notify("$newgroup->name ".get_string('notaddedto').$newgroup->coursename.get_string('notinyourcapacity'));
|
||||
}
|
||||
|
||||
else {
|
||||
} else {
|
||||
if (get_record("groups","name",$groupname,"courseid",$newgroup->courseid) || !($newgroup->id = insert_record("groups", $newgroup))) {
|
||||
|
||||
//Record not added - probably because group is already registered
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue