2 /***********************************************************************/
4 /***********************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /***********************************************************************/
15 class ATutorGroupService extends ATutorService implements GroupService {
17 * Fetch groups for a list of ids.
18 * @param UserId The user id to perform the action for
19 * @param GroupId optional grouping ID
20 * @param token The SecurityToken for this request
21 * @return ResponseItem a response item with the error code set if
24 function getPersonGroups($userId, GroupId $groupId, SecurityToken $token){
25 $ids = $this->getIdSet($userId, $groupId, $token);
26 $data = ATutorDbFetcher::get()->getPersonGroups($ids);
27 // If the data array is empty, return empty DataCollection.
28 return new DataCollection($data);