LTI Integration Library 5.2.0
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
ceLTIc\LTI\LineItem Class Reference

Class to represent a line-item. More...

Public Member Functions

 __construct (Platform $platform, string $label, int|float $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 (?int $limit=null)
 Retrieve all outcomes.
 
Outcome null bool readOutcome (User $user)
 Retrieve the outcome for a user.
 
bool submitOutcome (Outcome $ltiOutcome, User $user)
 Submit the outcome for a user.
 
bool deleteOutcome (User $user)
 Delete the outcome for a user.
 

Static Public Member Functions

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

Public Attributes

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

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()

ceLTIc\LTI\LineItem::__construct ( Platform $platform,
string $label,
int|float $pointsPossible )

Class constructor.

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

Member Function Documentation

◆ delete()

bool ceLTIc\LTI\LineItem::delete ( )

Delete the line-item on the platform.

Returns
bool True if successful

◆ deleteOutcome()

bool ceLTIc\LTI\LineItem::deleteOutcome ( User $user)

Delete the outcome for a user.

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

◆ fromEndpoint()

static LineItem bool ceLTIc\LTI\LineItem::fromEndpoint ( Platform $platform,
string $endpoint )
static

Retrieve a line-item definition.

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

Referenced by ceLTIc\LTI\Service\LineItem\deleteLineItem().

◆ getOutcomes()

Outcome[] bool ceLTIc\LTI\LineItem::getOutcomes ( ?int $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 ceLTIc\LTI\LineItem::getPlatform ( )

Get platform.

Returns
Platform Platform object for this line-item.

◆ readOutcome()

Outcome null bool ceLTIc\LTI\LineItem::readOutcome ( User $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

References $endpoint.

◆ save()

bool ceLTIc\LTI\LineItem::save ( )

Save the line-item to the platform.

Returns
bool True if successful

◆ submitOutcome()

bool ceLTIc\LTI\LineItem::submitOutcome ( Outcome $ltiOutcome,
User $user )

Submit the outcome for a user.

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

Member Data Documentation

◆ $endpoint

string ceLTIc\LTI\LineItem::$endpoint = null

Line-item endpoint.

Referenced by readOutcome().

◆ $gradesReleased

bool ceLTIc\LTI\LineItem::$gradesReleased = null

Grades should be released.

Referenced by ceLTIc\LTI\Service\LineItem\get().

◆ $label

string ceLTIc\LTI\LineItem::$label = null

Label value.

Referenced by ceLTIc\LTI\Service\LineItem\get().

◆ $ltiResourceLinkId

string ceLTIc\LTI\LineItem::$ltiResourceLinkId = null

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

◆ $pointsPossible

int float ceLTIc\LTI\LineItem::$pointsPossible = 1

Points possible value.

◆ $resourceId

string ceLTIc\LTI\LineItem::$resourceId = null

Tool resource ID associated with the line-item.

Referenced by ceLTIc\LTI\Service\LineItem\get(), and ceLTIc\LTI\Service\LineItem\getLineItem().

◆ $submissionReview

SubmissionReview ceLTIc\LTI\LineItem::$submissionReview = null

Submission review.

◆ $submitFrom

int ceLTIc\LTI\LineItem::$submitFrom = null

Outcome start submit timestamp.

◆ $submitUntil

int ceLTIc\LTI\LineItem::$submitUntil = null

Outcome end submit timestamp.

◆ $tag

string ceLTIc\LTI\LineItem::$tag = null

Tag value.

Referenced by ceLTIc\LTI\Service\LineItem\get().