LTI Integration Library 5.0.0-rc2
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
LineItem Class Reference

Class to represent a line item. More...

Public Member Functions

 __construct ($platform, $label, $pointsPossible)
 Class constructor.
 
Platform getPlatform ()
 Get platform.
 
bool save ()
 Save the line item to the platform.
 
bool delete ()
 Delete the line item on the platform.
 
Outcome[] bool getOutcomes ($limit=null)
 Retrieve all outcomes.
 
Outcome null bool readOutcome ($user)
 Retrieve the outcome for a user.
 
bool submitOutcome ($ltiOutcome, $user)
 Submit the outcome for a user.
 
bool deleteOutcome ($user)
 Delete the outcome for a user.
 

Static Public Member Functions

static LineItem bool fromEndpoint ($platform, $endpoint)
 Retrieve a line item definition.
 

Public Attributes

string $label = null
 Label value.
 
int $pointsPossible = 1
 Points possible value.
 
string null $ltiResourceLinkId = null
 LTI Resource Link ID with which the line item is associated.
 
string null $resourceId = null
 Tool resource ID associated with the line item.
 
string null $tag = null
 Tag value.
 
int null $submitFrom = null
 Outcome start submit timestamp.
 
int null $submitUntil = null
 Outcome end submit timestamp.
 
string $endpoint = null
 Line item endpoint.
 
SubmissionReview $submissionReview = null
 Submission review.
 

Detailed Description

Class to represent a line item.

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 (   $platform,
  $label,
  $pointsPossible 
)

Class constructor.

Parameters
Platform$platformPlatform object
string$labelLabel
int$pointsPossiblePoints possible value

Member Function Documentation

◆ delete()

bool delete ( )

Delete the line item on the platform.

Returns
bool True if successful

◆ deleteOutcome()

bool deleteOutcome (   $user)

Delete the outcome for a user.

Parameters
User$userUser object
Returns
bool True if successful, otherwise false

◆ fromEndpoint()

static LineItem bool fromEndpoint (   $platform,
  $endpoint 
)
static

Retrieve a line item definition.

Parameters
Platform$platformPlatform object
string$endpointID value
Returns
LineItem|bool LineItem object or false on error

◆ getOutcomes()

Outcome[] bool getOutcomes (   $limit = null)

Retrieve all outcomes.

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

◆ getPlatform()

Platform getPlatform ( )

Get platform.

Returns
Platform Platform object for this line item.

◆ readOutcome()

Outcome null bool readOutcome (   $user)

Retrieve the outcome for a user.

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

◆ save()

bool save ( )

Save the line item to the platform.

Returns
bool True if successful

◆ submitOutcome()

bool submitOutcome (   $ltiOutcome,
  $user 
)

Submit the outcome for a user.

Parameters
Outcome$ltiOutcomeOutcome object
User$userUser object
Returns
bool True if successful

Member Data Documentation

◆ $endpoint

string $endpoint = null

Line item endpoint.

$endpoint

◆ $label

string $label = null

Label value.

$label

◆ $ltiResourceLinkId

string null $ltiResourceLinkId = null

LTI Resource Link ID with which the line item is associated.

$ltiResourceLinkId

◆ $pointsPossible

int $pointsPossible = 1

Points possible value.

$pointsPossible

◆ $resourceId

string null $resourceId = null

Tool resource ID associated with the line item.

$resourceId

◆ $submissionReview

SubmissionReview $submissionReview = null

Submission review.

$submissionReview

◆ $submitFrom

int null $submitFrom = null

Outcome start submit timestamp.

$submitFrom

◆ $submitUntil

int null $submitUntil = null

Outcome end submit timestamp.

$submitUntil

◆ $tag

string null $tag = null

Tag value.

$tag


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