LTI Integration Library 5.2.0
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
ceLTIc\LTI\Service\Groups Class Reference

Class to implement the Course Groups service. More...

+ Inheritance diagram for ceLTIc\LTI\Service\Groups:

Public Member Functions

 __construct (Context $context, ?string $groupsEndpoint, ?string $groupSetsEndpoint=null, ?int $limit=null, bool $pagingMode=false)
 Class constructor.
 
bool get (bool $allowNonSets=false, ?User $user=null, ?int $limit=null)
 Get the course group sets and groups.
 
bool getGroupSets (?int $limit=null)
 Get the course group sets.
 
bool getGroups (bool $allowNonSets=false, ?User $user=null, ?int $limit=null)
 Get the course groups.
 
- Public Member Functions inherited from ceLTIc\LTI\Service\Service
 __construct (Platform $platform, ?string $endpoint)
 Class constructor.
 
Platform getPlatform ()
 Get platform.
 
string getScope ()
 Get access scope.
 
HttpMessage send (string $method, ?array $parameters=[], string $body='')
 Send a service request.
 
HttpMessage getHttpMessage ()
 Get HttpMessage object for last request.
 

Public Attributes

const MEDIA_TYPE_COURSE_GROUP_SETS = 'application/vnd.ims.lti-gs.v1.contextgroupsetcontainer+json'
 Media type for course group sets service.
 
const MEDIA_TYPE_COURSE_GROUPS = 'application/vnd.ims.lti-gs.v1.contextgroupcontainer+json'
 Media type for course groups service.
 
- Public Attributes inherited from ceLTIc\LTI\Service\Service
bool $unsigned = false
 Whether service request should be sent unsigned.
 

Static Public Attributes

static string $SCOPE = 'https://purl.imsglobal.org/spec/lti-gs/scope/contextgroup.readonly'
 Access scope.
 
static int $defaultLimit = null
 Default limit on size of container to be returned from requests.
 

Additional Inherited Members

- Protected Member Functions inherited from ceLTIc\LTI\Service\Service
array parseContextsInArray (object|array $contexts, array $arr)
 Parse the JSON for context references.
 
- Protected Attributes inherited from ceLTIc\LTI\Service\Service
string $endpoint = null
 Service endpoint.
 
string $scope = null
 Service access scope.
 
string $mediaType = null
 Media type of message body.
 

Detailed Description

Class to implement the Course Groups service.

Author
Stephen P Vickers steph.nosp@m.en@s.nosp@m.pvsof.nosp@m.twar.nosp@m.eprod.nosp@m.ucts.nosp@m..com
Licence: http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3

Constructor & Destructor Documentation

◆ __construct()

ceLTIc\LTI\Service\Groups::__construct ( Context $context,
?string $groupsEndpoint,
?string $groupSetsEndpoint = null,
?int $limit = null,
bool $pagingMode = false )

Class constructor.

Parameters
object$contextThe context to which the course groups apply
string | null$groupsEndpointService endpoint for course groups
string | null$groupSetsEndpointService endpoint for course group sets (optional)
int | null$limitLimit of objects to be returned in each request, null for all
bool$pagingModeTrue if only a single page should be requested when a limit is set

References ceLTIc\LTI\Service\Service\$endpoint.

Member Function Documentation

◆ get()

bool ceLTIc\LTI\Service\Groups::get ( bool $allowNonSets = false,
?User $user = null,
?int $limit = null )

Get the course group sets and groups.

Parameters
bool$allowNonSetsInclude groups which are not part of a set (optional)
User | null$userLimit response to groups for specified user (optional)
int | null$limitLimit on the number of objects to be returned in each request, null for service default (optional)
Returns
bool True if the operation was successful

References ceLTIc\LTI\Util\checkArray(), ceLTIc\LTI\Util\checkBoolean(), ceLTIc\LTI\Util\checkString(), ceLTIc\LTI\Service\Service\send(), and ceLTIc\LTI\Util\setMessage().

◆ getGroups()

bool ceLTIc\LTI\Service\Groups::getGroups ( bool $allowNonSets = false,
?User $user = null,
?int $limit = null )

Get the course groups.

Parameters
bool$allowNonSetsInclude groups which are not part of a set (optional)
User | null$userLimit response to groups for specified user (optional)
int | null$limitLimit on the number of course groups to be returned in each request, null for service default (optional)
Returns
bool True if the operation was successful

◆ getGroupSets()

bool ceLTIc\LTI\Service\Groups::getGroupSets ( ?int $limit = null)

Get the course group sets.

Parameters
int | null$limitLimit on the number of course group sets to be returned in each request, null for service default (optional)
Returns
bool True if the operation was successful

Member Data Documentation

◆ $defaultLimit

int ceLTIc\LTI\Service\Groups::$defaultLimit = null
static

Default limit on size of container to be returned from requests.

◆ $SCOPE

string ceLTIc\LTI\Service\Groups::$SCOPE = 'https://purl.imsglobal.org/spec/lti-gs/scope/contextgroup.readonly'
static

Access scope.

◆ MEDIA_TYPE_COURSE_GROUP_SETS

const ceLTIc\LTI\Service\Groups::MEDIA_TYPE_COURSE_GROUP_SETS = 'application/vnd.ims.lti-gs.v1.contextgroupsetcontainer+json'

Media type for course group sets service.

◆ MEDIA_TYPE_COURSE_GROUPS

const ceLTIc\LTI\Service\Groups::MEDIA_TYPE_COURSE_GROUPS = 'application/vnd.ims.lti-gs.v1.contextgroupcontainer+json'

Media type for course groups service.