LTI Integration Library 4.10.3
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.
 
 getPlatform ()
 Get platform.
 
 save ()
 Save the line-item to the platform.
 
 delete ()
 Delete the line-item on the platform.
 
 getOutcomes ($limit=null)
 Retrieve all outcomes.
 
 readOutcome ($user)
 Retrieve the outcome for a user.
 
 submitOutcome ($ltiOutcome, $user)
 Submit the outcome for a user.
 
 deleteOutcome ($user)
 Delete the outcome for a user.
 

Static Public Member Functions

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

Data Fields

 $label = null
 Label value.
 
 $pointsPossible = 1
 Points possible value.
 
 $ltiResourceLinkId = null
 LTI Resource Link ID with which the line item is associated.
 
 $resourceId = null
 Tool resource ID associated with the line-item.
 
 $tag = null
 Tag value.
 
 $submitFrom = null
 Outcome start submit timestamp.
 
 $submitUntil = null
 Outcome end submit timestamp.
 
 $endpoint = null
 Line-item endpoint.
 
 $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

Definition at line 14 of file LineItem.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $platform,
  $label,
  $pointsPossible 
)

Class constructor.

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

Definition at line 94 of file LineItem.php.

References LineItem\$label, and LineItem\$pointsPossible.

Member Function Documentation

◆ delete()

delete ( )

Delete the line-item on the platform.

Returns
bool True if successful

Definition at line 127 of file LineItem.php.

◆ deleteOutcome()

deleteOutcome (   $user)

Delete the outcome for a user.

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

Definition at line 180 of file LineItem.php.

◆ fromEndpoint()

static 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

Definition at line 195 of file LineItem.php.

References LineItem\$endpoint.

◆ getOutcomes()

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

Definition at line 140 of file LineItem.php.

◆ getPlatform()

getPlatform ( )

Get platform.

Returns
Platform Platform object for this line-item.

Definition at line 106 of file LineItem.php.

Referenced by LineItem\createLineItem(), LineItem\getAll(), and LineItem\saveLineItem().

◆ readOutcome()

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

Definition at line 153 of file LineItem.php.

◆ save()

save ( )

Save the line-item to the platform.

Returns
bool True if successful

Definition at line 116 of file LineItem.php.

◆ submitOutcome()

submitOutcome (   $ltiOutcome,
  $user 
)

Submit the outcome for a user.

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

Definition at line 167 of file LineItem.php.

Field Documentation

◆ $endpoint

string null $endpoint = null

Line-item endpoint.

Definition at line 71 of file LineItem.php.

Referenced by LineItem\__construct(), LineItem\fromEndpoint(), LineItem\getAll(), and LineItem\getLineItem().

◆ $label

string null $label = null

Label value.

Definition at line 22 of file LineItem.php.

Referenced by LineItem\__construct().

◆ $ltiResourceLinkId

string null $ltiResourceLinkId = null

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

Definition at line 36 of file LineItem.php.

Referenced by LineItem\getAll().

◆ $pointsPossible

int $pointsPossible = 1

Points possible value.

Definition at line 29 of file LineItem.php.

Referenced by LineItem\__construct().

◆ $resourceId

string null $resourceId = null

Tool resource ID associated with the line-item.

Definition at line 43 of file LineItem.php.

Referenced by LineItem\getAll().

◆ $submissionReview

SubmissionReview null $submissionReview = null

Submission review.

Definition at line 78 of file LineItem.php.

◆ $submitFrom

int null $submitFrom = null

Outcome start submit timestamp.

Definition at line 57 of file LineItem.php.

◆ $submitUntil

int null $submitUntil = null

Outcome end submit timestamp.

Definition at line 64 of file LineItem.php.

◆ $tag

string null $tag = null

Tag value.

Definition at line 50 of file LineItem.php.

Referenced by LineItem\getAll().


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