LTI Integration Library 5.1.4
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
Groups Class Reference

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

+ Inheritance diagram for 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 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 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 Service
array parseContextsInArray (object|array $contexts, array $arr)
 Parse the JSON for context references.
 
- Protected Attributes inherited from 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()

__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

Member Function Documentation

◆ get()

bool 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 Util\checkArray(), Util\checkBoolean(), Util\checkString(), Service\send(), and Util\setMessage().

◆ getGroups()

bool 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 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