From: toyomoyo Date: Tue, 27 Feb 2007 05:48:05 +0000 (+0000) Subject: fixing wrong capability check X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=10fddcc4e2fdcfd42f7ea1a21cbc05f2ba73f91e;p=moodle.git fixing wrong capability check --- diff --git a/course/import/groups/index.php b/course/import/groups/index.php index d66c570488..3d32f2445e 100755 --- a/course/import/groups/index.php +++ b/course/import/groups/index.php @@ -158,13 +158,13 @@ //if courseid is set if (isset($newgroup->courseid)){ - $newgroup->timecreated = time(); + $newgroup->timecreated = time(); $linenum++; $groupname = $newgroup->name; $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:managegroups', $newgrpcoursecontext)){ notify("$newgroup->name ".get_string('notaddedto').$newgroup->coursename.get_string('notinyourcapacity')); } else { if (get_record("groups","name",$groupname,"courseid",$newgroup->courseid) || !($newgroup->id = insert_record("groups", $newgroup))) {