Skip to content

Commit

Permalink
Group method stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
nelkasovic committed Aug 23, 2021
1 parent a345ca1 commit 96fbdb9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Facades/MoodleGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
* @method static GroupResourceCollection getCourseGroups(int $moodleCourseId)
* @method static UserResourceCollection getGroupMembers(int $moodleGroupId)
* @method static GroupResourceCollection delete(array $ids = [])
* @method static mixed create()
* @method static mixed addMember()
* @method static mixed removeMember()
*/
class MoodleGroup extends Facade
{
Expand Down
14 changes: 13 additions & 1 deletion src/Services/GroupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GroupService extends Service
{
public function getById(int $moodleGroupId): GroupResource
{
$arguments = ['groupids' => $moodleGroupId];
$arguments = ['groupids' => [$moodleGroupId]];

$response = $this->sendRequest('core_group_get_groups', $arguments);

Expand Down Expand Up @@ -41,4 +41,16 @@ public function delete(array $ids = []): GroupResourceCollection

return GroupResourceCollection::make($response);
}

public function create() {
// TODO
}

public function addMember() {
// TODO
}

public function removeMember() {
// TODO
}
}

0 comments on commit 96fbdb9

Please sign in to comment.