|
static | fromConsumer ($consumer, $ltiResourceLinkId, $tempId=null) |
| Class constructor from consumer.
|
|
static | fromContext ($context, $ltiResourceLinkId, $tempId=null) |
| Class constructor from context.
|
|
static | fromRecordId ($id, $dataConnector) |
| Load the resource link from the database.
|
|
|
int | $created = null |
| Date/time when the object was created.
|
|
string | $extRequest = null |
| Request for last service request.
|
|
array | $extRequestHeaders = null |
| Request headers for last service request.
|
|
string | $extResponse = null |
| Response from last service request.
|
|
array | $extResponseHeaders = null |
| Response header from last service request.
|
|
array | $groups = null |
| User groups (null if the consumer does not support the groups enhancement)
|
|
array | $groupSets = null |
| User group sets (null if the consumer does not support the groups enhancement)
|
|
string | $ltiResourceLinkId = null |
| Resource link ID as supplied in the last connection request.
|
|
string | $primaryResourceLinkId = null |
| Consumer key value for resource link being shared (if any).
|
|
boolean | $shareApproved = null |
| Whether the sharing request has been approved by the primary resource link.
|
|
string | $title = null |
| Context title.
|
|
int | $updated = null |
| Date/time when the object was last updated.
|
|
const | EXT_CREATE = 4 |
| Create action.
|
|
const | EXT_DELETE = 3 |
| Delete action.
|
|
const | EXT_READ = 1 |
| Read action.
|
|
const | EXT_TYPE_DECIMAL = 'decimal' |
| Decimal outcome type.
|
|
const | EXT_TYPE_LETTER_AF = 'letteraf' |
| Letter (A-F) outcome type.
|
|
const | EXT_TYPE_LETTER_AF_PLUS = 'letterafplus' |
| Letter (A-F) with optional +/- outcome type.
|
|
const | EXT_TYPE_PASS_FAIL = 'passfail' |
| Pass/fail outcome type.
|
|
const | EXT_TYPE_PERCENTAGE = 'percentage' |
| Percentage outcome type.
|
|
const | EXT_TYPE_RATIO = 'ratio' |
| Ratio outcome type.
|
|
const | EXT_TYPE_TEXT = 'freetext' |
| Free text outcome type.
|
|
const | EXT_UPDATE = 5 |
| Update action.
|
|
const | EXT_WRITE = 2 |
| Write (create/update) action.
|
|
◆ delete()
IMSGlobal\LTI\ToolProvider\ResourceLink::delete |
( |
| ) |
|
Delete the resource link from the database.
- Return values
-
boolean | True if the resource link was successfully deleted. |
◆ doMembershipsService()
IMSGlobal\LTI\ToolProvider\ResourceLink::doMembershipsService |
( |
| $withGroups = false | ) |
|
Perform a Memberships service request.
The user table is updated with the new list of user objects.
- Parameters
-
boolean | $withGroups | True is group information is to be requested as well |
- Return values
-
mixed | Array of User objects or False if the request was not successful |
◆ doOutcomesService()
IMSGlobal\LTI\ToolProvider\ResourceLink::doOutcomesService |
( |
| $action, |
|
|
| $ltiOutcome, |
|
|
| $user ) |
Perform an Outcomes service request.
- Parameters
-
int | $action | The action type constant |
Outcome | $ltiOutcome | Outcome object |
User | $user | User object |
- Return values
-
boolean | True if the request was successfully processed |
◆ doSettingService()
IMSGlobal\LTI\ToolProvider\ResourceLink::doSettingService |
( |
| $action, |
|
|
| $value = null ) |
Perform a Setting service request.
- Parameters
-
int | $action | The action type constant |
string | $value | The setting value (optional, default is null) |
- Return values
-
mixed | The setting value for a read action, true if a write or delete action was successful, otherwise false |
◆ fromConsumer()
static IMSGlobal\LTI\ToolProvider\ResourceLink::fromConsumer |
( |
| $consumer, |
|
|
| $ltiResourceLinkId, |
|
|
| $tempId = null ) |
|
static |
Class constructor from consumer.
- Parameters
-
ToolConsumer | $consumer | Consumer object |
string | $ltiResourceLinkId | Resource link ID value |
string | $tempId | Temporary Resource link ID value (optional, default is null) |
- Return values
-
◆ fromContext()
static IMSGlobal\LTI\ToolProvider\ResourceLink::fromContext |
( |
| $context, |
|
|
| $ltiResourceLinkId, |
|
|
| $tempId = null ) |
|
static |
Class constructor from context.
- Parameters
-
Context | $context | Context object |
string | $ltiResourceLinkId | Resource link ID value |
string | $tempId | Temporary Resource link ID value (optional, default is null) |
- Return values
-
◆ fromRecordId()
static IMSGlobal\LTI\ToolProvider\ResourceLink::fromRecordId |
( |
| $id, |
|
|
| $dataConnector ) |
|
static |
Load the resource link from the database.
- Parameters
-
int | $id | Record ID of resource link |
DataConnector | $dataConnector | Database connection object |
- Return values
-
ResourceLink | ResourceLink object |
◆ getConsumer()
IMSGlobal\LTI\ToolProvider\ResourceLink::getConsumer |
( |
| ) |
|
Get tool consumer.
- Return values
-
ToolConsumer | Tool consumer object for this resource link. |
◆ getContext()
IMSGlobal\LTI\ToolProvider\ResourceLink::getContext |
( |
| ) |
|
Get context.
- Return values
-
object | LTIContext object for this resource link. |
◆ getContextId()
IMSGlobal\LTI\ToolProvider\ResourceLink::getContextId |
( |
| ) |
|
Get context record ID.
- Return values
-
int | Context record ID for this resource link. |
◆ getDataConnector()
IMSGlobal\LTI\ToolProvider\ResourceLink::getDataConnector |
( |
| ) |
|
Get the data connector.
- Return values
-
mixed | Data connector object or string |
◆ getId()
IMSGlobal\LTI\ToolProvider\ResourceLink::getId |
( |
| ) |
|
Get resource link ID.
- Return values
-
string | ID for this resource link. |
◆ getKey()
IMSGlobal\LTI\ToolProvider\ResourceLink::getKey |
( |
| ) |
|
Get tool consumer key.
- Return values
-
string | Consumer key value for this resource link. |
◆ getMembership()
IMSGlobal\LTI\ToolProvider\ResourceLink::getMembership |
( |
| ) |
|
Get Memberships.
- Return values
-
mixed | The array of User objects if successful, otherwise false |
◆ getRecordId()
IMSGlobal\LTI\ToolProvider\ResourceLink::getRecordId |
( |
| ) |
|
Get resource link record ID.
- Return values
-
int | Record ID for this resource link. |
◆ getSetting()
IMSGlobal\LTI\ToolProvider\ResourceLink::getSetting |
( |
| $name, |
|
|
| $default = '' ) |
Get a setting value.
- Parameters
-
string | $name | Name of setting |
string | $default | Value to return if the setting does not exist (optional, default is an empty string) |
- Return values
-
◆ getSettings()
IMSGlobal\LTI\ToolProvider\ResourceLink::getSettings |
( |
| ) |
|
Get an array of all setting values.
- Return values
-
array | Associative array of setting values |
◆ getShares()
IMSGlobal\LTI\ToolProvider\ResourceLink::getShares |
( |
| ) |
|
Get an array of ResourceLinkShare objects for each resource link which is sharing this context.
- Return values
-
array | Array of ResourceLinkShare objects |
◆ getToolSettings()
Get Tool Settings.
- Parameters
-
int | $mode | Mode for request (optional, default is current level only) |
boolean | $simple | True if all the simple media type is to be used (optional, default is true) |
- Return values
-
mixed | The array of settings if successful, otherwise false |
◆ getUserResultSourcedIDs()
IMSGlobal\LTI\ToolProvider\ResourceLink::getUserResultSourcedIDs |
( |
| $localOnly = false, |
|
|
| $idScope = null ) |
Obtain an array of User objects for users with a result sourcedId.
The array may include users from other resource links which are sharing this resource link. It may also be optionally indexed by the user ID of a specified scope.
- Parameters
-
boolean | $localOnly | True if only users from this resource link are to be returned, not users from shared resource links (optional, default is false) |
int | $idScope | Scope to use for ID values (optional, default is null for consumer default) |
- Return values
-
array | Array of User objects |
◆ hasMembershipService()
IMSGlobal\LTI\ToolProvider\ResourceLink::hasMembershipService |
( |
| ) |
|
Check if the Membership service is supported.
- Return values
-
boolean | True if this resource link supports the Membership service |
◆ hasMembershipsService()
IMSGlobal\LTI\ToolProvider\ResourceLink::hasMembershipsService |
( |
| ) |
|
Check if the Memberships extension service is supported.
- Return values
-
boolean | True if this resource link supports the Memberships extension service |
◆ hasOutcomesService()
IMSGlobal\LTI\ToolProvider\ResourceLink::hasOutcomesService |
( |
| ) |
|
Check if the Outcomes service is supported.
- Return values
-
boolean | True if this resource link supports the Outcomes service (either the LTI 1.1 or extension service) |
◆ hasSettingService()
IMSGlobal\LTI\ToolProvider\ResourceLink::hasSettingService |
( |
| ) |
|
Check if the Setting extension service is supported.
- Return values
-
boolean | True if this resource link supports the Setting extension service |
◆ hasToolSettingsService()
IMSGlobal\LTI\ToolProvider\ResourceLink::hasToolSettingsService |
( |
| ) |
|
Check if the Tool Settings service is supported.
- Return values
-
boolean | True if this resource link supports the Tool Settings service |
◆ initialise()
IMSGlobal\LTI\ToolProvider\ResourceLink::initialise |
( |
| ) |
|
Initialise the resource link.
Pseudonym for initialize().
◆ save()
IMSGlobal\LTI\ToolProvider\ResourceLink::save |
( |
| ) |
|
Save the resource link to the database.
- Return values
-
boolean | True if the resource link was successfully saved. |
◆ saveSettings()
IMSGlobal\LTI\ToolProvider\ResourceLink::saveSettings |
( |
| ) |
|
Save setting values.
- Return values
-
boolean | True if the settings were successfully saved |
◆ setConsumerId()
IMSGlobal\LTI\ToolProvider\ResourceLink::setConsumerId |
( |
| $consumerId | ) |
|
Set tool consumer ID.
- Parameters
-
int | $consumerId | Tool Consumer ID for this resource link. |
◆ setContextId()
IMSGlobal\LTI\ToolProvider\ResourceLink::setContextId |
( |
| $contextId | ) |
|
Set context ID.
- Parameters
-
int | $contextId | Context ID for this resource link. |
◆ setRecordId()
IMSGlobal\LTI\ToolProvider\ResourceLink::setRecordId |
( |
| $id | ) |
|
Set resource link record ID.
- Parameters
-
int | $id | Record ID for this resource link. |
◆ setSetting()
IMSGlobal\LTI\ToolProvider\ResourceLink::setSetting |
( |
| $name, |
|
|
| $value = null ) |
Set a setting value.
- Parameters
-
string | $name | Name of setting |
string | $value | Value to set, use an empty value to delete a setting (optional, default is null) |
◆ setSettings()
IMSGlobal\LTI\ToolProvider\ResourceLink::setSettings |
( |
| $settings | ) |
|
Set an array of all setting values.
- Parameters
-
array | $settings | Associative array of setting values |
◆ setToolSettings()
IMSGlobal\LTI\ToolProvider\ResourceLink::setToolSettings |
( |
| $settings = array() | ) |
|
Perform a Tool Settings service request.
- Parameters
-
array | $settings | An associative array of settings (optional, default is none) |
- Return values
-
boolean | True if action was successful, otherwise false |
◆ $created
int IMSGlobal\LTI\ToolProvider\ResourceLink::$created = null |
Date/time when the object was created.
$created
◆ $extRequest
string IMSGlobal\LTI\ToolProvider\ResourceLink::$extRequest = null |
Request for last service request.
$extRequest
◆ $extRequestHeaders
array IMSGlobal\LTI\ToolProvider\ResourceLink::$extRequestHeaders = null |
Request headers for last service request.
$extRequestHeaders
◆ $extResponse
string IMSGlobal\LTI\ToolProvider\ResourceLink::$extResponse = null |
Response from last service request.
$extResponse
◆ $extResponseHeaders
array IMSGlobal\LTI\ToolProvider\ResourceLink::$extResponseHeaders = null |
Response header from last service request.
$extResponseHeaders
◆ $groups
array IMSGlobal\LTI\ToolProvider\ResourceLink::$groups = null |
User groups (null if the consumer does not support the groups enhancement)
$groups
◆ $groupSets
array IMSGlobal\LTI\ToolProvider\ResourceLink::$groupSets = null |
User group sets (null if the consumer does not support the groups enhancement)
$groupSets
◆ $ltiResourceLinkId
string IMSGlobal\LTI\ToolProvider\ResourceLink::$ltiResourceLinkId = null |
Resource link ID as supplied in the last connection request.
$ltiResourceLinkId
◆ $primaryResourceLinkId
string IMSGlobal\LTI\ToolProvider\ResourceLink::$primaryResourceLinkId = null |
Consumer key value for resource link being shared (if any).
$primaryResourceLinkId
◆ $shareApproved
boolean IMSGlobal\LTI\ToolProvider\ResourceLink::$shareApproved = null |
Whether the sharing request has been approved by the primary resource link.
$shareApproved
◆ $title
string IMSGlobal\LTI\ToolProvider\ResourceLink::$title = null |
◆ $updated
int IMSGlobal\LTI\ToolProvider\ResourceLink::$updated = null |
Date/time when the object was last updated.
$updated
The documentation for this class was generated from the following file:
- lib/ltiprovider/src/ToolProvider/ResourceLink.php