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

Class to implement the Result service. More...

Inheritance diagram for Result:
AssignmentGrade Service

Public Member Functions

 __construct ($platform, $endpoint, $limit=null, $pagingMode=false)
 Class constructor.
 
 getAll ($limit=null)
 Retrieve all outcomes for a line-item.
 
 get ($user)
 Retrieve an outcome for a user.
 
- Public Member Functions inherited from AssignmentGrade
 __construct ($platform, $endpoint, $path='')
 Class constructor.
 
- 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.
 

Static Public Attributes

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

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ __construct()

__construct (   $platform,
  $endpoint,
  $limit = null,
  $pagingMode = false 
)

Class constructor.

Parameters
Platform$platformPlatform object for this service request
string$endpointService endpoint
int | null$limitLimit of results 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 59 of file Result.php.

References Service\$endpoint, and Result\$SCOPE.

Member Function Documentation

◆ get()

get (   $user)

Retrieve an outcome for a user.

Parameters
User$userUser object
Returns
Outcome|null|bool Outcome object, or null if none, or false on error

Definition at line 119 of file Result.php.

References Service\send().

◆ getAll()

getAll (   $limit = null)

Retrieve all outcomes for a line-item.

Parameters
int | null$limitLimit of results to be returned in each request, null for service default
Returns
Outcome[]|bool Array of Outcome objects or false on error

Definition at line 75 of file Result.php.

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

Field Documentation

◆ $defaultLimit

int $defaultLimit = 500
static

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

Definition at line 31 of file Result.php.

Referenced by Result\getAll().

◆ $SCOPE

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

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