Class to implement the Line-item service. More...
Public Member Functions | |
| __construct (Platform $platform, string $endpoint, ?int $limit=null, bool $pagingMode=false) | |
| Class constructor. | |
| LTI LineItem[] bool | getAll (?string $ltiResourceLinkId=null, ?string $resourceId=null, ?string $tag=null, ?int $limit=null) |
| Retrieve all line-items. | |
| bool | createLineItem (LTI\LineItem $lineItem) |
| Create a new line-item. | |
| bool | saveLineItem (LTI\LineItem $lineItem) |
| Save a line-item. | |
| bool | deleteLineItem (LTI\LineItem $lineItem) |
| Delete a line-item. | |
| LTI LineItem bool | get () |
| Retrieve a line-item. | |
| Public Member Functions inherited from AssignmentGrade | |
| __construct (Platform $platform, string $endpoint, string $path="") | |
| Class constructor. | |
| Public Member Functions inherited from Service | |
| __construct (Platform $platform, ?string $endpoint) | |
| Class constructor. | |
| Platform | getPlatform () |
| Get platform. | |
| string | getScope () |
| Get access scope. | |
| HttpMessage | send (string $method, ?array $parameters=[], string $body="") |
| Send a service request. | |
| HttpMessage | getHttpMessage () |
| Get HttpMessage object for last request. | |
Static Public Member Functions | |
| static LTI LineItem bool | getLineItem (Platform $platform, string $endpoint) |
| Retrieve a line-item. | |
Public Attributes | |
| const | MEDIA_TYPE_LINE_ITEM = 'application/vnd.ims.lis.v2.lineitem+json' |
| Line-item media type. | |
| const | MEDIA_TYPE_LINE_ITEMS = 'application/vnd.ims.lis.v2.lineitemcontainer+json' |
| Line-item container media type. | |
| Public Attributes inherited from Service | |
| bool | $unsigned = false |
| Whether service request should be sent unsigned. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Service | |
| array | parseContextsInArray (object|array $contexts, array $arr) |
| Parse the JSON for context references. | |
| Protected Attributes inherited from Service | |
| string | $endpoint = null |
| Service endpoint. | |
| string | $scope = null |
| Service access scope. | |
| string | $mediaType = null |
| Media type of message body. | |
Class to implement the Line-item service.
| __construct | ( | Platform | $platform, |
| string | $endpoint, | ||
| ?int | $limit = null, | ||
| bool | $pagingMode = false ) |
Class constructor.
| Platform | $platform | Platform object for this service request |
| string | $endpoint | Service endpoint |
| int | null | $limit | Limit of line-items to be returned in each request, null for all |
| bool | $pagingMode | True if only a single page should be requested when a limit is set |
References Service\send().
| bool createLineItem | ( | LTI\LineItem | $lineItem | ) |
Create a new line-item.
| LTI\LineItem | $lineItem | Line-item object |
References deleteLineItem(), and Service\send().
| bool deleteLineItem | ( | LTI\LineItem | $lineItem | ) |
Delete a line-item.
| LTI\LineItem | $lineItem | Line-item object |
References Service\$endpoint, and fromEndpoint().
Referenced by createLineItem().
Retrieve a line-item.
References $gradesReleased, $label, $resourceId, $tag, Util\checkBoolean(), Util\checkDateTime(), Util\checkNumber(), and Util\checkString().
| LTI LineItem[] bool getAll | ( | ?string | $ltiResourceLinkId = null, |
| ?string | $resourceId = null, | ||
| ?string | $tag = null, | ||
| ?int | $limit = null ) |
Retrieve all line-items.
The returned items can be filtered by a resource link ID, a resource ID and/or a tag. Requests can also be limited to a number of items which may mean that multiple requests will be made to retrieve the full list.
| string | null | $ltiResourceLinkId | LTI resource link ID (optional) |
| string | null | $resourceId | Tool resource ID (optional) |
| string | null | $tag | Tag (optional) |
| int | null | $limit | Limit of line-items to be returned in each request, null for service default (optional) |
Retrieve a line-item.
| Platform | $platform | Platform object for this service request |
| string | $endpoint | Line-item endpoint |
| bool saveLineItem | ( | LTI\LineItem | $lineItem | ) |
Save a line-item.
| LTI\LineItem | $lineItem | Line-item object |