fix for MDL-8666, groups import broken

This commit is contained in:
toyomoyo
2007-02-27 05:40:05 +00:00
parent 96f56bc4ff
commit 9f39ff6d96
+2 -4
View File
@@ -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