LTI Integration Library 4.10.3
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:
Service

Public Member Functions

 __construct ($context, $groupsEndpoint, $groupSetsEndpoint=null, $limit=null, $pagingMode=false)
 Class constructor.
 
 get ($allowNonSets=false, $user=null, $limit=null)
 Get the course group sets and groups.
 
 getGroupSets ($limit=null)
 Get the course group sets.
 
 getGroups ($allowNonSets=false, $user=null, $limit=null)
 Get the course groups.
 
- Public Member Functions inherited from Service
 __construct ($platform, $endpoint)
 Class constructor.
 
 getConsumer ()
 Get tool consumer.
 
 getPlatform ()
 Get platform.
 
 getScope ()
 Get access scope.
 
 send ($method, $parameters=array(), $body=null)
 Send a service request.
 
 getHttpMessage ()
 Get HttpMessage object for last request.
 

Data Fields

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.
 
- Data Fields inherited from Service
 $unsigned = false
 Whether service request should be sent unsigned.
 

Static Public Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from Service
 parseContextsInArray ($contexts, $arr)
 Parse the JSON for context references.
 
- Protected Attributes inherited from Service
 $endpoint = null
 Service endpoint.
 
 $scope = null
 Service access scope.
 
 $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

Definition at line 15 of file Groups.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $context,
  $groupsEndpoint,
  $groupSetsEndpoint = null,
  $limit = null,
  $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

Definition at line 90 of file Groups.php.

References Groups\$SCOPE, and Groups\MEDIA_TYPE_COURSE_GROUPS.

Member Function Documentation

◆ get()

get (   $allowNonSets = false,
  $user = null,
  $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

Definition at line 112 of file Groups.php.

References Groups\getGroups(), and Groups\getGroupSets().

◆ getGroups()

getGroups (   $allowNonSets = false,
  $user = null,
  $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

Definition at line 188 of file Groups.php.

References Groups\$defaultLimit, Service\$endpoint, Groups\MEDIA_TYPE_COURSE_GROUPS, and Service\send().

Referenced by Groups\get().

◆ getGroupSets()

getGroupSets (   $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

Definition at line 133 of file Groups.php.

References Groups\$defaultLimit, Service\$endpoint, Groups\MEDIA_TYPE_COURSE_GROUP_SETS, and Service\send().

Referenced by Groups\get().

Field Documentation

◆ $defaultLimit

int null $defaultLimit = null
static

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

Definition at line 40 of file Groups.php.

Referenced by Groups\getGroups(), and Groups\getGroupSets().

◆ $SCOPE

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

Access scope.

Definition at line 33 of file Groups.php.

Referenced by Groups\__construct().

◆ MEDIA_TYPE_COURSE_GROUP_SETS

const MEDIA_TYPE_COURSE_GROUP_SETS = 'application/vnd.ims.lti-gs.v1.contextgroupsetcontainer+json'

Media type for course group sets service.

Definition at line 21 of file Groups.php.

Referenced by Groups\getGroupSets().

◆ MEDIA_TYPE_COURSE_GROUPS

const MEDIA_TYPE_COURSE_GROUPS = 'application/vnd.ims.lti-gs.v1.contextgroupcontainer+json'

Media type for course groups service.

Definition at line 26 of file Groups.php.

Referenced by Groups\__construct(), and Groups\getGroups().


The documentation for this class was generated from the following file: